Re: Error messages on duplicate schema names
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andrus <kobruleht2@hot.ee>, pgsql-general@postgresql.org
Date: 2021-01-19T20:37:51Z
Lists: 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
Commits
-
Fix ALTER DEFAULT PRIVILEGES with duplicated objects
- 0ddb529cf3e2 9.5.25 landed
- 7dc3be9df86c 9.6.21 landed
- 74ee3abcfefa 10.16 landed
- 1c3a4d44d844 11.11 landed
- 5ad672fc2f65 12.6 landed
- 31e0f9d76bb0 13.2 landed
- 21378e1fefed 14.0 landed