Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgAaC-00070W-KL for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jul 2018 15:11:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fgAaA-0001AF-JM for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jul 2018 15:11:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgAaA-0001A8-CF for pgsql-hackers@lists.postgresql.org; Thu, 19 Jul 2018 15:11:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgAa7-0001AE-Bg for pgsql-hackers@lists.postgresql.org; Thu, 19 Jul 2018 15:11:05 +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 w6JFB0xN023119; Thu, 19 Jul 2018 11:11:00 -0400 From: Tom Lane To: Oleksandr Shulgin cc: Alexander Korotkov , "David G. Johnston" , pgsql-hackers@lists.postgresql.org Subject: Re: psql's \d versus included-index-column feature In-reply-to: References: <21724.1531943735@sss.pgh.pa.us> Comments: In-reply-to Oleksandr Shulgin message dated "Thu, 19 Jul 2018 10:04:01 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23117.1532013060.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 19 Jul 2018 11:11:00 -0400 Message-ID: <23118.1532013060@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Oleksandr Shulgin writes: > I don't think there is an established practice on how to display this so= rt > of info, but I see that both styles already exist, namely: > =3D# \dL > List of languages > Name | Owner | Trusted | Description > ------------+----------+---------+------------------------------ > plpgsql | postgres | t | PL/pgSQL procedural language > plproxy | postgres | f | > ... > and > =3D# \dC > List of casts > Source type | Target type | Functi= on > | Implicit? > -----------------------------+-----------------------------+------------= --------+--------------- > abstime | date | date > | in assignment > abstime | integer | (binary > coercible) | no > abstime | timestamp without time zone | timestamp > | yes > ... > I like the second option more, for readability reasons and because it is > easier to extend if ever needed. > Given that the documentation refers to included columns as "non-key > columns", it seems natural to me to name the \d output column "Key?" and > use "yes/no" as the values. WFM, anyone want to argue against? regards, tom lane