Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement - Mailing list pgsql-hackers

From Akshay Joshi
Subject Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement
Date
Msg-id CANxoLDdV-ciaYqhWiZCRh3Nv+iW9o1LOGvS83TCZ=5X261OjNA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement  (Marcos Pegoraro <marcos@f10.com.br>)
Responses Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement
List pgsql-hackers


On Fri, Nov 7, 2025 at 6:45 PM Marcos Pegoraro <marcos@f10.com.br> wrote:
Em sex., 7 de nov. de 2025 às 09:21, Akshay Joshi <akshay.joshi@enterprisedb.com> escreveu:

Attached is the v7 patch, which is ready for review.

For this functionality to be complete, the 
ALTER TABLE ... ENABLE ROW LEVEL SECURITY
statement needs to be added to the command. 

Did you think about that ?
Maybe one more parameter ?

I don’t think we need that statement. Could you please elaborate on where exactly it needs to be added?
The purpose of this reconstruction DDL is to generate the DDL for an already created policy. The command you mentioned is used to enable row-level security on the table, which is a separate step. 

regards
Marcos


pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue
Next
From: Ranier Vilela
Date:
Subject: Xlogprefetcher: Use atomic add for increment counter