Re: Error messages on duplicate schema names - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Error messages on duplicate schema names
Date
Msg-id 20210119203751.GA5473@alvherre.pgsql
Whole thread Raw
In response to Re: Error messages on duplicate schema names  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Error messages on duplicate schema names
List pgsql-general
On 2021-Jan-15, Michael Paquier wrote:

> On Wed, Jan 06, 2021 at 07:15:24PM +0200, Andrus wrote:
> > Should duplicate schema names accepted or should their usage throw better
> > error messages.
> 
> This means that we are one call of CommandCounterIncrement() short for
> such queries, and similar safeguards already exist in this area for
> GRANT/REVOKE.  The spot where I would put this new CCI is at the end
> of SetDefaultACL(), like in the attached with a test added to
> privileges.sql.
> 
> Any thoughts from others?

Looks to match what we do in ExecGrant_Relation() et al, so +1.

I guess you could make the case that the CCI call should be in the
callers where we actually loop (SetDefaultACLsInSchemas,
RemoveRoleFromObjectACL), but it's hard to get excited about the added
clutter.

-- 
Álvaro Herrera       Valdivia, Chile



pgsql-general by date:

Previous
From: Kämpf, Heiko (OWL-IT)
Date:
Subject: Ist there a chance to provide postGIS 3.x combined with postgreSQL12 or 13 as a zypper repository released for SLES15 SP1 or SP2
Next
From: Michael Lewis
Date:
Subject: Re: Accounting for between table correlation