From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-hackers@lists.postgresql.org, Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: \dP and \dX use ::regclass without "pg_catalog."
Date: Sat, 8 Jan 2022 16:50:19 -0300
Message-ID: <202201081950.teiyz4ic43oi@alvherre.pgsql> (raw)
In-Reply-To: <YdlBqKDsHSbSsQ1j@paquier.xyz>
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)
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-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, michael@paquier.xyz, pryzby@telsasoft.com, tatsuro.yamada.tf@nttcom.co.jp, magnus@hagander.net, tomas.vondra@enterprisedb.com
Subject: Re: \dP and \dX use ::regclass without "pg_catalog."
In-Reply-To: <202201081950.teiyz4ic43oi@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