Re: psql's describe command (for sequences) output improvement

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Aftab Hussain <aftab(dot)se(at)gmail(dot)com>
Cc: Peter Childs <peterachilds(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql's describe command (for sequences) output improvement
Date: 2007-12-16 06:48:22
Message-ID: 200712160648.lBG6mMW27402@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Aftab Hussain wrote:
> In general, \d command is working perfectly for database objects.
>
> For sequences, I think the current \d some_sequence command's output is
> displaying information which does not help the end user very much. Also
> isn't the newly display information (same as information provided by 'select
> * from test_seq;' statement) is/can-be-considered the metadata information
> about the sequences queried about (since for the returning sequences data we
> have nextval('...'), currval('...') functions)?

Yes, you are kind of right that \d on sequences provides unhelpful
output, but having it display the sequence values seems odd. TODO has:

o Have psql show current values for a sequence

Maybe \d+ sequence_name should add a column that shows the current
values:

test=> \d+ x
Sequence "public.x"
Column | Type | Value | Description
---------------+---------+----------------------
sequence_name | name | x
last_value | bigint | 1
increment_by | bigint |
max_value | bigint |
min_value | bigint |
cache_value | bigint |
log_cnt | bigint |
is_cycled | boolean |
is_called | boolean |

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-12-16 10:00:33 Re: pgindent issue with EXEC_BACKEND-only typedefs
Previous Message Pavel Stehule 2007-12-16 06:39:32 Re: VLDB Features