Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5mqV-003d3c-0v for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 15:42:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5mqS-003UYG-2N for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 15:42:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5mqS-003UXs-1R for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 15:42:04 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5mqQ-00000001J7I-08Tj for pgsql-hackers@postgresql.org; Thu, 26 Mar 2026 15:42:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 62QFfrj9999714; Thu, 26 Mar 2026 11:41:53 -0400 From: Tom Lane To: Greg Sabino Mullane cc: Maiquel Grassi , David Christensen , Peter Eisentraut , Jim Jones , pgsql-hackers Subject: Re: Adding comments to help understand psql hidden queries In-reply-to: <3707727.1774307021@sss.pgh.pa.us> References: <8c9b9b7d-0868-46d4-963c-8b1906bd7a1b@eisentraut.org> <72f6995a-75a6-4579-9e93-45a80f6bd956@eisentraut.org> <2597072.1737232674@sss.pgh.pa.us> <3616299.1774287304@sss.pgh.pa.us> <3707727.1774307021@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 23 Mar 2026 19:03:41 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <999712.1774539713.1@sss.pgh.pa.us> Date: Thu, 26 Mar 2026 11:41:53 -0400 Message-ID: <999713.1774539713@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Greg Sabino Mullane writes: >>> Notably, I didn't like that some of the headers said "table" and some said >>> "relation". I made them all say "table", although you could certainly >>> argue for the opposite. >> I originally had "table", but then it felt weird in my testing when I was >> describing a sequence or view it said table. So I'm a weak +1 for relation. > My preference for "table" is likewise weak. Anyone else have an > opinion? [ crickets... ] After sleeping on it and taking another look at the output, I agree that we need to use a mix of "relation" and "table", because some of these queries definitely apply to all kinds of pg_class entries, while for others we must be dealing with a table (or something reasonably table-like, such as a foreign table). I made another pass over it to fix that, and pushed the results. Thanks for working on this! I know it's been a long process, but sometimes that's what it takes to get to a consensus. regards, tom lane