public inbox for [email protected]
help / color / mirror / Atom feedExtend CREATE POLICY to add IF EXISTS
2+ messages / 1 participants
[nested] [flat]
* Extend CREATE POLICY to add IF EXISTS
@ 2025-10-20 21:45 Paul Austin <[email protected]>
2025-10-20 21:49 ` RE: Extend CREATE POLICY to add IF EXISTS Paul Austin <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Paul Austin @ 2025-10-20 21:45 UTC (permalink / raw)
To: [email protected] <[email protected]>
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* RE: Extend CREATE POLICY to add IF EXISTS
2025-10-20 21:45 Extend CREATE POLICY to add IF EXISTS Paul Austin <[email protected]>
@ 2025-10-20 21:49 ` Paul Austin <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Paul Austin @ 2025-10-20 21:49 UTC (permalink / raw)
To: Paul Austin <[email protected]>; [email protected] <[email protected]>
I forgot DROP POLICY already has IF EXISTS
From: Paul Austin <[email protected]>
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 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-10-20 21:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-20 21:45 Extend CREATE POLICY to add IF EXISTS Paul Austin <[email protected]>
2025-10-20 21:49 ` Paul Austin <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox