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 1n6HjR-0001VS-Ar for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jan 2022 19:50:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n6HjP-0005Th-OU for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jan 2022 19:50:27 +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 1n6HjP-0005TY-F3 for pgsql-hackers@lists.postgresql.org; Sat, 08 Jan 2022 19:50:27 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6HjM-0002q6-1n for pgsql-hackers@postgresql.org; Sat, 08 Jan 2022 19:50:26 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 098675C00D4; Sat, 8 Jan 2022 14:50:23 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 08 Jan 2022 14:50:23 -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=Wzt8RArAuBPj3D/4TW5St6di+SAO2g20199HAxN1/HU=; b=Ye5LrISp T8lDJl7g3FLmhT+VNuBEb9lII9r4aqxT2gC7McWPDov25oCVq3ZyxCeSiydgZAvF v6PwlOSI6GOyK1B4xy+dun8NGjU4SU3XeKLshbnvahCXDE/AysEjcgE/tSLYdm6l t1mfQ986v8pBSrayx7MobTlWO4txTnwnLQ/LtZed8c3qTvc8CP1qyHAVn/7qTzTR jBs6qwsBN2VlqJ9RhpDFSXaAbrd8JJ7ALQN36BWEmzJaQFht1FjyO0hrHYWvYcSZ YNmV/g/kusggTHorc2egg/93FcsgEH+JCGSK1/2vDbJZHg+Kp7BPqza7tDzbqXxX LDt8I3Du8XU+hg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudeghedguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudevgeetieeiheefudevveefgeejieejtdevteekkeel gffgleegteehvdduteegnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 8 Jan 2022 14:50:22 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 176CE2A07B3; Sat, 8 Jan 2022 16:50:19 -0300 (-03) Date: Sat, 8 Jan 2022 16:50:19 -0300 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Michael Paquier Cc: Justin Pryzby , Tatsuro Yamada , Magnus Hagander , pgsql-hackers@lists.postgresql.org, Tomas Vondra , pgsql-hackers@postgresql.org Subject: Re: \dP and \dX use ::regclass without "pg_catalog." Message-ID: <202201081950.teiyz4ic43oi@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Jan-08, Michael Paquier wrote: > The detection regex posted upthread is kind of cool. Yes, but it's not bulletproof -- it only detects uses of some unqualified object name that is also used with qualification. Here it detected "text" unqualified, but only because we already had pg_catalog.text elsewhere. As an exercise, if you revert this commit and change one of those "text" to "int", it's not detected as a problem. My point is that it's good to have it, but it would be much better to have something bulletproof, which we could use in an automated check somewhere (next to stuff like perlcritic, perhaps). I don't know what, though. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Cuando no hay humildad las personas se degradan" (A. Christie)