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

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql's \d versus included-index-column feature
Date: 2018-07-18 23:11:11
Message-ID: CAPpHfdsz6M1VsQ82n1wWUf22QCKgLjgzXjyURrCi2Ad-atFUkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 18, 2018 at 11:14 PM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Wed, Jul 18, 2018 at 12:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>>
>> regression=# \d tbl_include_reg_idx
>> Index "public.tbl_include_reg_idx"
>> Column | Type | Key | Definition
>> --------+---------+------------------
>> c1 | integer | t | c1
>> c2 | integer | t | c2
>> c3 | integer | f | c3
>> c4 | box | f | c4
>> btree, for table "public.tbl_include_reg"
>>
>
> ​+1 for the additional column indicating whether the column is being
> treated as key data or supplemental included data.​
>

+1
And especially I don't think we should place word "INCLUDE" to the
definition column.

​-1 for printing a boolean t/f; would rather spell it out:
>

IMHO, t/f have advantage of brevity. From my point of view, covering
indexes are not so evident feature. So, users need to spend some time
reading documentation before realizing what they are and how to use them.
So, I don't expect that short designation of INCLUDE columns as "non-key"
(Key == false) columns could be discouraging here.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-07-18 23:16:01 Re: Have an encrypted pgpass file
Previous Message Thomas Munro 2018-07-18 22:18:10 Re: Have an encrypted pgpass file