Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-19 Thread Akshay Joshi
Thanks Álvaro Will work on it and send the updated patch. On Wed, Nov 19, 2025 at 4:17 PM Álvaro Herrera wrote: > Hello, > > One thing I realized a few days ago is that since commit bd09f024a1bb we > have type regdatabase, so instead of having two functions (one taking > name and one taking Oid)

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-19 Thread Akshay Joshi
On Wed, Nov 19, 2025 at 3:48 PM Japin Li wrote: > > Hi Akshay, > > Thanks for updating the patch. > > On Tue, 18 Nov 2025 at 13:33, Akshay Joshi > wrote: > > Hi Chao > > > > Thanks for reviewing my patch. > > > > On Tue, Nov 18, 2025 at 5:5

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-18 Thread Akshay Joshi
Hi Chao Thanks for reviewing my patch. On Tue, Nov 18, 2025 at 5:59 AM Chao Li wrote: > Hi Akshay, > > I just reviewed v3 and got some comments: > > > On Nov 17, 2025, at 22:34, Akshay Joshi > wrote: > > > > All the review comments have been addressed i

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-17 Thread Akshay Joshi
The v3 patch adds a check for the CONNECT privilege on the target database for pg_get_database_ddl(). This aligns its security model with functions like pg_database_size(). Note that revoking permissions on the *pg_database* table alone is insufficient to restrict DDL access; users must manually re

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-17 Thread Akshay Joshi
On Fri, Nov 14, 2025 at 11:19 AM Japin Li wrote: > On Thu, Nov 13, 2025 at 02:02:30PM +0530, Akshay Joshi wrote: > > On Thu, Nov 13, 2025 at 10:18 AM Quan Zongliang > > wrote: > > > > > > > > > > > On 11/13/25 12:17 PM, Quan Zongliang wrote: >

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Akshay Joshi
On Thu, Nov 13, 2025 at 10:18 AM Quan Zongliang wrote: > > > On 11/13/25 12:17 PM, Quan Zongliang wrote: > > > > > > On 11/12/25 8:04 PM, Akshay Joshi wrote: > >> Hi Hackers, > >> > >> I’m submitting a patch as part of the broader Retail

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Akshay Joshi
On Thu, Nov 13, 2025 at 9:47 AM Quan Zongliang wrote: > > > On 11/12/25 8:04 PM, Akshay Joshi wrote: > > Hi Hackers, > > > > I’m submitting a patch as part of the broader Retail DDL Functions > > project described by Andrew Dunstan https://www.postgresql.org/m

[PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-12 Thread Akshay Joshi
ocumentation, in-code comments, and regression tests, all of which pass successfully. *Note:* To run the regression tests, particularly the pg_upgrade tests successfully, I had to add a helper function, ddl_filter (in database.sql), which removes locale and collation-related information from the pg_

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-11-09 Thread Akshay Joshi
majority feels it should be included in this feature. On Fri, Nov 7, 2025 at 8:18 PM Marcos Pegoraro wrote: > Em sex., 7 de nov. de 2025 às 11:27, Akshay Joshi < > [email protected]> escreveu: > >> I don’t think we need that statement. Could you please elaborate on wher

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-11-07 Thread Akshay Joshi
On Fri, Nov 7, 2025 at 6:45 PM Marcos Pegoraro wrote: > Em sex., 7 de nov. de 2025 às 09:21, Akshay Joshi < > [email protected]> escreveu: > >> Attached is the v7 patch, which is ready for review. >> >>> <https://enterprisedb.com> >>&g

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-11-07 Thread Akshay Joshi
Hi Hackers, Make the pretty flag a default parameter by adding CREATE OR REPLACE FUNCTION in system_functions.sql. Attached is the v7 patch, which is ready for review. On Mon, Nov 3, 2025 at 5:17 PM Akshay Joshi wrote: > Hi Hackers, > > Added a new #define GET_DDL_PRETTY_FLAGS be

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-11-03 Thread Akshay Joshi
behavior for pg_get__ddl functions. Updated the logic of the get_formatted_string function based on Tim Waizenegger’s suggestion. I am attaching the new v6 patch, which is ready for review. On Tue, Oct 28, 2025 at 3:08 PM Akshay Joshi wrote: > Thanks, Mark, for your review comments and the upda

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-28 Thread Akshay Joshi
Thanks, Mark, for your review comments and the updated patch. I’ve incorporated your changes and prepared a combined v5 patch. The v5 patch is attached for further review. On Mon, Oct 27, 2025 at 10:15 PM Mark Wong wrote: > Hi everyone, > > On Thu, Oct 16, 2025 at 01:47:53PM +053

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-24 Thread Akshay Joshi
On Thu, Oct 23, 2025 at 12:19 AM Philip Alger wrote: > > > >>> The get_formatted_string function is needed. Instead of using multiple >> if statements for the pretty flag, it’s better to have a generic >> function. This will be useful if the pretty-format DDL implementation is >> accepted by the

Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement

2025-10-23 Thread Akshay Joshi
On Wed, 22 Oct, 2025, 17:30 Tim Waizenegger, < [email protected]> wrote: > On Wed, Oct 22, 2025 at 12:27 PM Chao Li wrote: > > > > Hi Tim, > > > > Thanks for working on this. I haven’t finished reviewing the entire > patch. But I got a quick question: > > > > While reviewing a simi

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-22 Thread Akshay Joshi
On Wed, Oct 22, 2025 at 12:51 PM jian he wrote: > On Thu, Oct 16, 2025 at 8:51 PM Akshay Joshi > wrote: > > > > Please find attached the v3 patch, which resolves all compilation errors > and warnings. > > > > drop table if exists t, ts, ts1; > create table t

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-22 Thread Akshay Joshi
On Tue, Oct 21, 2025 at 2:39 PM Chao Li wrote: > > > > On Oct 16, 2025, at 20:50, Akshay Joshi > wrote: > > > > Please find attached the v3 patch, which resolves all compilation errors > and warnings. > > > > On Thu, Oct 16, 2025 at 6:06 PM Philip Alger

[PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-18 Thread Akshay Joshi
AS PERMISSIVE FOR ALL TO regress_rls_alice, regress_rls_dave USING (true) ; The patch includes documentation, in-code comments, and regression tests, all of which pass successfully. - Regards, Akshay Joshi EDB (EnterpriseDB) 0001-Add-pg_get_policy_

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-17 Thread Akshay Joshi
On Wed, Oct 15, 2025 at 11:00 PM Philip Alger wrote: > Hi Akshay, > > When applying the patch, I got a number of errors and the tests failed. I > think it stems from: > > + targetTable = relation_open(tableID, NoLock); > + relation_close(targetTable, NoLock); > > > I changed them to use "AccessSh

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-16 Thread Akshay Joshi
Please find attached the v3 patch, which resolves all compilation errors and warnings. On Thu, Oct 16, 2025 at 6:06 PM Philip Alger wrote: > Hi Akshay, > > As for the statement terminator, it’s useful to include it, while >>> running multiple queries together could result in a syntax error.

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-16 Thread Akshay Joshi
On Wed, Oct 15, 2025 at 10:55 PM Álvaro Herrera wrote: > Hello, > > I have reviewed this patch before and provided a number of comments that > have been addressed by Akshay (so I encourage you to list my name and > this address in a Reviewed-by trailer line in the commit message). One > thing I