Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hO1xg-00087s-OM for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2019 15:24:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hO1xf-0001PR-5D for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2019 15:24:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hO1xe-0001MR-Ow for pgsql-hackers@lists.postgresql.org; Tue, 07 May 2019 15:24:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hO1xc-00060D-Hr for pgsql-hackers@postgresql.org; Tue, 07 May 2019 15:24:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x47FOorM030642; Tue, 7 May 2019 11:24:50 -0400 From: Tom Lane To: Stephen Frost cc: Rafia Sabih , Justin Pryzby , PostgreSQL-development Subject: Re: make \d pg_toast.foo show its indices In-reply-to: <20190507151600.GH6197@tamriel.snowman.net> References: <20190422154902.GH14223@telsasoft.com> <20190503142721.GC3925@telsasoft.com> <16689.1557158298@sss.pgh.pa.us> <20190507151600.GH6197@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Tue, 07 May 2019 11:16:00 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30640.1557242690.1@sss.pgh.pa.us> Date: Tue, 07 May 2019 11:24:50 -0400 Message-ID: <30641.1557242690@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> Rafia Sabih writes: >>> IMHO, what makes more sense is to show the name of associated toast >>> table in the \dt+ of the normal table. >> I'm not for that: it's useless information in at least 99.44% of cases. > I don't think I'd put it in \dt+, but the toast table is still > pg_toast.pg_toast_{relOid}, right? What about showing the OID of the > table in the \d output, eg: > => \d comments > Table "public.comments" (50788) Not unless you want to break every regression test that uses \d. Instability of the output is also a reason not to show the toast table's name in the parent's \d[+]. >> Possibly it is useful in the other direction as Justin suggests. >> Not sure though --- generally, if you're looking at a specific >> toast table, you already know which table is its parent. But >> maybe confirmation is a good thing. > As mentioned elsewhere, there are certainly times when you don't know > that info and if you're looking at the definition of a TOAST table, > which isn't terribly complex, it seems like a good idea to go ahead and > include the table it's the TOAST table for. I'm not against putting that info into the result of \d on the toast table. regards, tom lane