Re: psql's \d versus included-index-column feature

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-07-18T20:46:16Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2018-Jul-18, David G. Johnston wrote:
>> -1 for printing a boolean t/f; would rather spell it out:
>> 
>> CASE WHEN "Key" THEN 'Key' ELSE 'Included' END AS "Data"

> +1

I can sympathize with the eyestrain argument against t/f, but the
above doesn't seem like an improvement --- in particular, "Data"
as the column header seems quite content-free.  My counterproposal
is to keep "Key" as the header and use "Yes"/"No" as the values.

I'd be OK with "Key"/"Included" as the values if someone can
propose an on-point column header to go with those.

			regards, tom lane


Commits

  1. Fix pg_get_indexdef()'s behavior for included index columns.

  2. Improve psql's \d command to show whether index columns are key columns.