Re: split up psql \d Modifiers column

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: split up psql \d Modifiers column
Date: 2016-10-28 05:41:50
Message-ID: CAFj8pRCSdtHMowa9B9G+y9wt-YbQHFKg1Rx4f7d_anPm=EATcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-10-28 5:30 GMT+02:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com
>:

> I propose to change the psql \d output a bit, best shown with an example:
>
> \d persons3
> - Table "public.persons3"
> - Column | Type | Modifiers
> ---------+---------+------------------
> - id | integer | not null
> - name | text | default ''::text
> + Table "public.persons3"
> + Column | Type | Collation | Nullable | Default
> +--------+---------+-----------+----------+----------
> + id | integer | | not null |
> + name | text | | | ''::text
>
>
> The "Modifiers" column used to be "the rest", but now \d+ adds
> additional columns, so throwing these three things into one column makes
> less sense.
>
> Also, some parts of that column are currently marked as translatable,
> but it is not clear whether this is supposed to be an English
> description or SQL text. By reducing the column contents to just the
> data and moving the description to the column header, this weirdness is
> avoided.
>
> If you're worried about horizontal space, note that if a column has all
> three properties, this will actually save space because the words
> "collate" and "default" go away.
>
> Patch attached. Most of it is test output changes; the code changes are
> in src/bin/psql/describe.c.
>

has sense

+ 1

Pavel

>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-10-28 05:53:22 Re: Proposal: scan key push down to heap [WIP]
Previous Message Amit Kapila 2016-10-28 05:19:45 Re: [BUG] pg_basebackup from disconnected standby fails