Re: Extend CREATE POLICY to add IF EXISTS - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Extend CREATE POLICY to add IF EXISTS
Date
Msg-id 91c8bea5-b966-4cea-a303-c904feb5fd72@aklaver.com
Whole thread Raw
In response to RE: Extend CREATE POLICY to add IF EXISTS  (Paul Austin <paul.austin@automutatio.com>)
Responses Re: Extend CREATE POLICY to add IF EXISTS
List pgsql-general
On 10/20/25 14:49, Paul Austin wrote:
> I forgot DROP POLICY already has IF EXISTS

I take it that works for you?

> 
> *From:*Paul Austin <paul.austin@automutatio.com>
> *Sent:* October 20, 2025 2:46 PM
> *To:* pgsql-general@lists.postgresql.org
> *Subject:* Extend CREATE POLICY to add IF EXISTS
> 
> Many (but not all) DDL statements use the pattern IF EXISTS or IF NOT 
> EXISTS. This is really useful if you want to create a re-start-able data 
> model update script without needing to have PL/pgSQL blocks that has 
> checks to see if it exists.
> 
> An example of a statement that doesn’t implement this pattern in the 
> CREATE POLICY statement.
> 
> Is there a plan to add this pattern to the rest of the DDL statements? 
> Or could it be added to the CREATE/DROP POLICY statements?
> 
> Thanks,
> 
> Paul
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Paul Austin
Date:
Subject: RE: Extend CREATE POLICY to add IF EXISTS
Next
From: Paul Austin
Date:
Subject: Re: Extend CREATE POLICY to add IF EXISTS