Subject: Extend CREATE POLICY to add IF EXISTS

From: Paul Austin <[email-masked]>
Date: Mon, 20 Oct 2025 21:45:56 +0000

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

---

From: Paul Austin <[email-masked]>
Date: Mon, 20 Oct 2025 21:49:12 +0000

I forgot DROP POLICY already has IF EXISTS

From: Paul Austin <[email-masked]>
Sent: October 20, 2025 2:46 PM
To: [email-masked]
Subject: Extend CREATE POLICY to add IF EXISTS

Thanks,
Paul