Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1xlP-0004MC-TC for pgsql-general@arkaria.postgresql.org; Tue, 19 Jan 2021 20:38:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1xlN-0005pe-2m for pgsql-general@arkaria.postgresql.org; Tue, 19 Jan 2021 20:38:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1xlM-0005pW-9q for pgsql-general@lists.postgresql.org; Tue, 19 Jan 2021 20:38:04 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1xlF-0005ez-Tr for pgsql-general@postgresql.org; Tue, 19 Jan 2021 20:38:03 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id B868F5C0145; Tue, 19 Jan 2021 15:37:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 19 Jan 2021 15:37:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=vwfa9v6efQPcpqzPPIDw2PhHmJ1SCnCDut4prHc5fyI=; b=OF+Bb8Xh mzvGoCB6hx7FuHIvO1V8MUvkAO/Ivg455iYJM1gRMJiE2mUmbRofnSqhlBX7aXTx Fr46Z1iZ3C6wJM8abBQd0lafCu09B7ECiFJIRfSzEEwGOjIJIOpNEMqCQ7Mt/Xl6 Uo5yJs+gxJWJgmDWgLKO9cxg9l8A40JQD9b5eAAArNYdp0AWPnUQuHEnonExJXjo UWnP/xgCXGZXragIbLfLCNXg/V1uGOgm+q1jMRl0ByFNMrM9rE999LA/Fzbk4yGa td2Ii2jQ4rRyp34iWXVcmaogN34tLJe6wJY69mu0EkD3wE6k92XXVIeCYGTHJawp /IqfbrjaU90sVA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddtgddugedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjfgesthekredttderudenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepueffhfejieeuueffgedvudekgeeltdeviedvieeufeei ieevgfetheeufeethedvnecukfhppeduledtrdelhedrudelrddujeejnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.177]) by mail.messagingengine.com (Postfix) with ESMTPA id ED0D124005C; Tue, 19 Jan 2021 15:37:54 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D68DE2A0D2C; Tue, 19 Jan 2021 17:37:51 -0300 (-03) Date: Tue, 19 Jan 2021 17:37:51 -0300 From: Alvaro Herrera To: Michael Paquier Cc: Andrus , pgsql-general@postgresql.org Subject: Re: Error messages on duplicate schema names Message-ID: <20210119203751.GA5473@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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