pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andrus <kobruleht2@hot.ee>
Cc: pgsql-general@postgresql.org
Subject: Re: Error messages on duplicate schema names
Date: Tue, 19 Jan 2021 17:37:51 -0300
Message-ID: <20210119203751.GA5473@alvherre.pgsql> (raw)
In-Reply-To: <YAEZ6D+R5tSGk08i@paquier.xyz>

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





view thread (4+ messages)  latest in thread

Message-ID: <20210119203751.GA5473@alvherre.pgsql>
Permalink:  ../20210119203751.GA5473@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210119203751.GA5473@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: alvherre@alvh.no-ip.org, michael@paquier.xyz, kobruleht2@hot.ee
  Subject: Re: Error messages on duplicate schema names
  In-Reply-To: <20210119203751.GA5473@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox