From: Justin Pryzby <pryzby@telsasoft.com>
To: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-hackers@lists.postgresql.org, Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Subject: Re: \dP and \dX use ::regclass without "pg_catalog."
Date: Thu, 6 Jan 2022 20:22:35 -0600
Message-ID: <20220107022235.GA14051@telsasoft.com> (raw)
In-Reply-To: <CABUevEy=+Ehpcncgh93zd3qCBDBVE8mp3ZYLc=3CBnLMpiuP-Q@mail.gmail.com>
https://www.postgresql.org/message-id/flat/7ad8cd13-db5b-5cf6-8561-dccad1a934cb%40nttcom.co.jphttps://www.postgresql.org/message-id/flat/20210827193151.GN26465%40telsasoft.com
On Sat, Aug 28, 2021 at 08:57:32AM -0400, Álvaro Herrera wrote:
> On 2021-Aug-27, Justin Pryzby wrote:
> > I noticed that for \dP+ since 1c5d9270e, regclass is written without
> > "pg_catalog." (Alvaro and I failed to notice it in 421a2c483, too).
>
> Oops, will fix shortly.
On Tue, Sep 28, 2021 at 04:25:11PM +0200, Magnus Hagander wrote:
> On Mon, Sep 27, 2021 at 2:14 AM Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp> wrote:
> > I found other functions that we should add "pg_catalog" prefix in
> > describe.c. This fix is similar to the following commit.
>
> Yup, that's correct. Applied and backpatched to 14 (but it won't be in the
> 14.0 release).
Those two issues were fixed in 1f092a309 and 07f8a9e784.
But, we missed two casts to ::text which don't use pg_catalog.
Evidently the cast is to allow stable sorting.
I improved on my previous hueristic to look for these ; this finds the two
missing schema qualifiers:
> time grep "$(sed -r "/.*pg_catalog\\.([_[:alpha:]]+).*/! d; s//\\1/; /^(char|oid)$/d; s/.*/[^. ']\\\\<&\\\\>/" src/bin/psql/describe.c |sort -u)" src/bin/psql/describe.c
While looking at that, I wondered why describeOneTableDetails lists stats
objects in order of OID ? Dating back to 7b504eb28, and, before that,
554A73A6.2060603@2ndquadrant.com. It should probably order by nsp, stxname.
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: pryzby@telsasoft.com, alvherre@alvh.no-ip.org, magnus@hagander.net, tomas.vondra@enterprisedb.com, tatsuro.yamada.tf@nttcom.co.jp, alvherre@2ndquadrant.com
Subject: Re: \dP and \dX use ::regclass without "pg_catalog."
In-Reply-To: <20220107022235.GA14051@telsasoft.com>
* 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