Re: Extend CREATE POLICY to add IF EXISTS

2025-10-21 Thread Ron Johnson
Doesn't CREATE OR REPLACE have limitations based on parameter-list changes? On Tue, Oct 21, 2025 at 10:08 AM Paul Austin wrote: > Álvaro, > > Yes, a CREATE OR REPLACE would also be useful. > > However, the CREATE IF NOT EXISTS is also useful when you aren't concerned > that the POLICY is going t

RE: Extend CREATE POLICY to add IF EXISTS

2025-10-21 Thread Paul Austin
Álvaro, Yes, a CREATE OR REPLACE would also be useful. However, the CREATE IF NOT EXISTS is also useful when you aren't concerned that the POLICY is going to change. Same with the existing CREATE TABLE IF NOT EXISTS. Yes I'm aware that the DROP/CREATE can create a security hole, which is why I

Re: Extend CREATE POLICY to add IF EXISTS

2025-10-21 Thread Álvaro Herrera
On 2025-Oct-20, Paul Austin wrote: > 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. How would CREATE IF NOT EXISTS handle the case of an existing policy that doesn't match the one yo