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 1pLawo-0006D0-KC for pgsql-committers@arkaria.postgresql.org; Sat, 28 Jan 2023 02:28:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pLawn-0004Ge-7V for pgsql-committers@arkaria.postgresql.org; Sat, 28 Jan 2023 02:28:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLawl-0004Ex-V7 for pgsql-committers@lists.postgresql.org; Sat, 28 Jan 2023 02:28:05 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLawi-0006Fv-H3 for pgsql-committers@lists.postgresql.org; Sat, 28 Jan 2023 02:28:03 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8CCDE5C054C; Fri, 27 Jan 2023 21:27:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 27 Jan 2023 21:27:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1674872878; x=1674959278; bh=Q3WSz3XaCp mcxl46XKFhPuiTJ/2QhdIGCu3p5K8s3bk=; b=cGRjkeg4Sb/i98+OSuxDwgirli uz4SpW6BwUkZixU3056uEB/QQ6A6Zj8CCXlFWIvptSC5YhMAEXszgHfPZrlmUarP kdJLuNMeKGBBzLMV88Pn7L8HaYc5iWwZx9xHtljsX8dxXMNiC68IEyI54ULdC3C3 7AZP4bjBLUYNpiS6A5vpssE2Dfd1y786/jbtlT4aKuqvqMnHVOKgT/Fr6nwbcCeh U/I7RvB1CXmBNxVLqMlOL0ZNcQIpH1E29/QoGI0VY2YPUiBEJp4+cgj/Xq2AGcHl bo3i3dI79CU4jRPwLaxjYqTjx7iT2H76qM1VKnJ/mEOPi1WYtnW3L40nJpmQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1674872878; x=1674959278; bh=Q3WSz3XaCpmcxl46XKFhPuiTJ/2Q hdIGCu3p5K8s3bk=; b=hdIlo86GEvNh5eE28Q1GbkZF4eof6Hx4Q6/UFR/f10Rl T4P57bK6HNiPVFWpENj4v5rdWPuzSzt+MudA44f5lt637cwUHSWRLUfq8UAofKp1 aLop1U1516BtvjhynPgj6wjUqhpmnOG6wGHPeUHaAJP9z8Fmdq1GPhNFao7hAeHa 6RMokemg2hcyYsrfgN53RA1WMFF7cpNedHCwAkE0cL0cGmS5MJExK2mMjMXdx7X/ RLq7WYdCu1qam1MiyV2VVCrQK15lnRrbsNHXjrGNW+494HO/qWD4xIj6g0SdzARW AxUPa4cH0LevQ6gQRWHxNvTfwj4jPYNL7YN30iucFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvjedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Jan 2023 21:27:55 -0500 (EST) Date: Sat, 28 Jan 2023 11:27:52 +0900 From: Michael Paquier To: Tom Lane Cc: Justin Pryzby , Andrew Dunstan , Robert Haas , Alvaro Herrera , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Adjust interaction of CREATEROLE with role properties. Message-ID: References: <25633601-9749-a03c-e1cc-8ff2cf7c599a@dunslane.net> <20230126183106.GS22427@telsasoft.com> <3248936.1674785303@sss.pgh.pa.us> <3255990.1674789499@sss.pgh.pa.us> <6c20449e-ac9c-7876-0d90-70a1ddea1076@dunslane.net> <20230127152854.GY22427@telsasoft.com> <3332370.1674834413@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="m0yCjhkxnuKV2Onp" Content-Disposition: inline In-Reply-To: <3332370.1674834413@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --m0yCjhkxnuKV2Onp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 27, 2023 at 10:46:53AM -0500, Tom Lane wrote: > I was imagining that pg_regress could contain a function that > issues some predefined queries and complains if the results > aren't empty. It already has the ability to issue commands > to the cluster-under-test (for the initial CREATE DATABASE etc) > so at least most of the infrastructure is easily at hand. Agreed. I was also thinking among these lines this morning after waking up. There is a pattern here, actually. Without storing full queries, we could have a function that has arguments about: - The attribute name to report back if we find an unwanted name. - The catalog name to query. - The qual to use. That's an implementation detail, though. There is also a gotcha that has not been mentioned yet: there should be an option switch to control if this check is run or not. In the tree, test_pg_dump is an exception where this is not going to work, because we leave around the role regress_dump_test_role after repeated installchecks. It has been argued in the past that this should be cleaned up, but also counter-argued that this is useful for pg_upgrade in the buildfarm with the dump of extensions. -- Michael --m0yCjhkxnuKV2Onp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmPUiCgACgkQnvQgOdby QH1O1Q/+KAgpUWwuWi9gXDd+eRm+910A2mgFDCSPntYZQfLZCMb8NCuxkWA9e3pM 96P87ZAEEXjyhPlRHCO2kqUyTRD0KlWnwNvTrTACSspFvkDTkNBozAovbFDIslKp AyyUGGqghm/zMu041gnu2JHKz6trLQtHNk9RUyc4uBfg5RG369lgw46LG43wx1ei 7T5q7i+brPfB7ZAlH6DS8LAhLPzxGOl+o2F5kVVX9YoHMb3kE9fggv7GgDTC+w5a A1CmgOzTg2GKaKsj2eXg53TaVgsm13ImK0eCNBPxCGB14APn211SoYCMEVjt1sO8 eTnc0kPqKjDWXJWY+oINsldVzkkn6/nviGidxsV6DxD5kzQBgqPF8jnPDZN+6tmS oiLaQqZTYl6vOYLh0lYDdFjQW4VaWTvY2WZiELgQ0zIV/wb/H7DfsLTgroteYj7k r5f/Aa70svvlJKpNXJjqqXfPH2OFYvHsPYgFgc6oNckJ5/HFRsjpJw0J6GrAfQpN 4QMoSxYgUUmxSeL8PV6amAo8f/zuWKMh0n7Yu1eRS7cxj7ifqoioVNZVbaSXap60 eNEc/2jAV6MwUpeHvlDzeEhl5FazJLdXIK62/RMrdG/dHWPx2p0GB9cNMCkORhpo ppbRXrMZKLinjXu74wA3qy2h9DatQpaz66rX5Q9EO8mi9LuNfAY= =51bg -----END PGP SIGNATURE----- --m0yCjhkxnuKV2Onp--