RE: Extend CREATE POLICY to add IF EXISTS

2025-10-21 Thread Paul Austin
ich is why I'd like the IF NOT EXISTS. At the moment my use case stops the application prior to running this script and the database is in a private network. -Original Message- From: Álvaro Herrera Sent: October 21, 2025 12:23 AM To: Paul Austin Cc: [email protected].

Re: Extend CREATE POLICY to add IF EXISTS

2025-10-20 Thread Paul Austin
Adrian, The drop policy IF EXISTS does work. But it would be nice to have the IF NOT EXISTS on CREATE POLICY so I don't need to do a drop and create. From: Adrian Klaver Sent: October 20, 2025 14:51 To: Paul Austin ; [email protected]

RE: Extend CREATE POLICY to add IF EXISTS

2025-10-20 Thread Paul Austin
I forgot DROP POLICY already has IF EXISTS From: Paul Austin Sent: October 20, 2025 2:46 PM To: [email protected] 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

Extend CREATE POLICY to add IF EXISTS

2025-10-20 Thread Paul Austin
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 p