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 1n5etv-0000cE-GS for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 02:22:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5etu-0005wJ-E2 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 02:22:42 +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 1n5etu-0005vw-1Q for pgsql-hackers@lists.postgresql.org; Fri, 07 Jan 2022 02:22:42 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5etq-0000rr-Gl for pgsql-hackers@lists.postgresql.org; Fri, 07 Jan 2022 02:22:40 +0000 Received: by mail-il1-x134.google.com with SMTP id x15so3546681ilc.5 for ; Thu, 06 Jan 2022 18:22:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=XSKAdWyQtWukHiIyaF0c9B1YA7hAY041he4d7qhE6LM=; b=WgmP31EA1iFNpgk1RjUgMZN0/zHalMl8Eb8HtKiyzXk8eV6eunHcH3m6oIA2cdFbwE 61BQN/XiFOUDz4Q0UMR4zGq1wCvxMEigtOWb9kSOhjqkKnD6nqP89IKbqHE0wpOdNMPg W9I6ZmrUpG0376r71kqmKW8+VnNStVWfi0Hbzk7SC2SG1xjeiOHnJhZNGuegJ46yJR1Y wMeJ8Nyn7x5J2xYRB4pyq4sqdAshH+TIK9gjFpegHP1gWJyrwo3HzUrWmSZ1SOZLK3Xq MvBQNuLDFQRr3fJd6L0oARHTy/osd+/PuAGAq4cllKsvVIrl7opCthTVSMSPOZyNAKSO iNeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=XSKAdWyQtWukHiIyaF0c9B1YA7hAY041he4d7qhE6LM=; b=6EaCH5p9d2+rVeA+Wer4US0q3ntIavLp1D2U4mBzWHLwNPMcD+Ac8u0hY11PCjGTdB dWos71VMkuIOjgklQp85hqAHtG1aHxoHxAMOvOZ5ipTm4McPpgZbXzmt8RCy6L3aZX4B CRFZOChe/qB11G/SCZ0MEOTzU/XK8D89i/Jnj42FTPkRLmJDcHso+IFTEgSTDC5xm5Hp +mfZXoAAgOthAQII2ftJKix10o1XOYc6uzrqulTTHdMIkGbV6KjBWEc0/3f157jEDgUu Smt0LYeAI1fH7nIoY4C7sx2iq6LmZF0tDeObDPcnB0VhN1LEP0KFV5rI5J7mStPodnOd 33+g== X-Gm-Message-State: AOAM533RNYPQB7xzcHnRIx6+9Dq780Ki5akJQRXQMlESkUU1tdkPV7j9 WsTGhB5AhQCu17fMqm968snljw== X-Google-Smtp-Source: ABdhPJxwiHAV60Y4v/jNKNiuB8KwV0+vbQKiCZNSSwpelx5BlXFQHNvg74sEPrqkGoI1WUj+DRJyWQ== X-Received: by 2002:a05:6e02:b2f:: with SMTP id e15mr29786445ilu.110.1641522157178; Thu, 06 Jan 2022 18:22:37 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id i12sm2082749ilu.84.2022.01.06.18.22.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jan 2022 18:22:36 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id EDBFE8023E3; Thu, 6 Jan 2022 20:22:35 -0600 (CST) Date: Thu, 6 Jan 2022 20:22:35 -0600 From: Justin Pryzby To: =?iso-8859-1?Q?=C1lvaro?= Herrera , Magnus Hagander Cc: pgsql-hackers@lists.postgresql.org, Tomas Vondra , Tatsuro Yamada , PostgreSQL-development , Alvaro Herrera Subject: Re: \dP and \dX use ::regclass without "pg_catalog." Message-ID: <20220107022235.GA14051@telsasoft.com> 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.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk https://www.postgresql.org/message-id/flat/7ad8cd13-db5b-5cf6-8561-dccad1a934cb%40nttcom.co.jp https://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 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.