Thread: Possible bug in psql 9.4.4

Possible bug in psql 9.4.4

From
Leonardo M. Ramé
Date:
It looks like psql 9.4.4 has a bug when trying to display table info
using \d tablename.

On 9.4.2 that command displays Indexes, Constraints, Triggers, etc.
9.4.4 only displays the table fields.

Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877


Re: Possible bug in psql 9.4.4

From
Leonardo M. Ramé
Date:

El 26/02/16 a las 15:59, Leonardo M. Ramé escribió:
> It looks like psql 9.4.4 has a bug when trying to display table info
> using \d tablename.
>
> On 9.4.2 that command displays Indexes, Constraints, Triggers, etc.
> 9.4.4 only displays the table fields.
>
> Regards,

Sorry, option \t (Tuples Only) must be off to display that info.



Re: Possible bug in psql 9.4.4

From
"David G. Johnston"
Date:
On Fri, Feb 26, 2016 at 12:15 PM, Leonardo M. Ramé <l.rame@griensu.com> wrote:


El 26/02/16 a las 15:59, Leonardo M. Ramé escribió:
It looks like psql 9.4.4 has a bug when trying to display table info
using \d tablename.

On 9.4.2 that command displays Indexes, Constraints, Triggers, etc.
9.4.4 only displays the table fields.

Regards,

Sorry, option \t (Tuples Only) must be off to display that info.


​This is surprising (to me).

​--tuples-only: 
Turn off printing of column names and result row count footers, etc.

​I guess that falls under "etc." but still...

I always thought of it that while the \d command had to run queries to obtain its data the output was basically a pre-defined screen that could be influenced by adding a "+" to the command but it otherwise operated independently of the other style-oriented commands.  So, I could choose to run my queries under whatever settings I desired but if I need to access the data dictionary for help I wouldn't have to turn off tuples-only just to see some additional info and then turn it back on when I run my query.

That said I do little interactive work with psql - I much prefer a non-CLI application for ad-hoc work - ​so maybe linking the two has value.  But to me at least I am a bit surprised.

David J.


Re: Possible bug in psql 9.4.4

From
Adrian Klaver
Date:
On 02/26/2016 11:51 AM, David G. Johnston wrote:
> On Fri, Feb 26, 2016 at 12:15 PM, Leonardo M. Ramé <l.rame@griensu.com
> <mailto:l.rame@griensu.com>>wrote:
>
>
>
>     El 26/02/16 a las 15:59, Leonardo M. Ramé escribió:
>
>         It looks like psql 9.4.4 has a bug when trying to display table info
>         using \d tablename.
>
>         On 9.4.2 that command displays Indexes, Constraints, Triggers, etc.
>         9.4.4 only displays the table fields.
>
>         Regards,
>
>
>     Sorry, option \t (Tuples Only) must be off to display that info.
>
>
> ​This is surprising (to me).
>
> ​--tuples-only:
> Turn off printing of column names and result row count footers, etc.
>
> ​I guess that falls under "etc." but still...
>
> I always thought of it that while the \d command had to run queries to
> obtain its data the output was basically a pre-defined screen that could
> be influenced by adding a "+" to the command but it otherwise operated
> independently of the other style-oriented commands.  So, I could choose
> to run my queries under whatever settings I desired but if I need to
> access the data dictionary for help I wouldn't have to turn off
> tuples-only just to see some additional info and then turn it back on
> when I run my query.

The fuller description of what happens is here:

http://www.postgresql.org/docs/9.4/interactive/app-psql.html

\pset [ option [ value ] ]

tuples_only (or t)

     If value is specified it must be either on or off which will enable
or disable tuples-only mode. If value is omitted the command toggles
between regular and tuples-only output. Regular output includes extra
information such as column headers, titles, and various footers. In
tuples-only mode, only actual table data is shown.



>
> That said I do little interactive work with psql - I much prefer a
> non-CLI application for ad-hoc work - ​so maybe linking the two has
> value.  But to me at least I am a bit surprised.
>
> David J.
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com