From: | "Aftab Hussain" <aftab(dot)se(at)gmail(dot)com> |
---|---|
To: | "Peter Childs" <peterachilds(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: psql's describe command (for sequences) output improvement |
Date: | 2007-12-05 08:31:22 |
Message-ID: | 1fe1c5a10712050031q660ffd72u951e8fced66042ad@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Dec 4, 2007 7:47 PM, Peter Childs <peterachilds(at)gmail(dot)com> wrote:
>
>
> On 04/12/2007, Aftab Hussain <aftab(dot)hussain(at)enterprisedb(dot)com> wrote:
> >
> >
> > Hi all,
> >
> > I have a patch which tries to improve the '\d some_sequence_name'
> > command output in psql utility. Before sending the patch to pgsql-patches I
> > just want to know your opinion whether the new output of the command is OK
> > or it needs to be modified before sending it to pgsql-patches.
> >
> > For comparison purpose, here is the output of the '\d
> > some_sequence_name' command:
> >
> > -- Say we have created a sequence named 'test_seq' already as CREATE
> > SEQUENCE test_seq.
> >
> > --
> > -- Output: before applying the patch.
> > --
> > testdb=# \d test_seq;
> > Sequence "public.test_seq"
> > Column | Type
> > ---------------+---------
> > sequence_name | name
> > last_value | bigint
> > increment_by | bigint
> > max_value | bigint
> > min_value | bigint
> > cache_value | bigint
> > log_cnt | bigint
> > is_cycled | boolean
> > is_called | boolean
> >
> > --
> > -- Output: after applying the patch.
> > --
> > testdb=# \d test_seq;
> > Sequence "public.test_seq"
> > last_value | increment_by | max_value | min_value |
> > cache_value | log_cnt | is_cycled | is_called
> >
> > ------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
> > 1 | 1 | 9223372036854775807 | 1 |
> > 1 | 1 | f | f
> >
> >
> >
> > Thanks in advance for your feedback(s).
> >
> > --
> > Aftab.
> >
> Why?
>
> is that not what
>
> select * from test_seq;
>
> does already.
>
> \d command return meta data not data.
>
> Peter Childs
>
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)?
Please correct me if I am wrong or have missed something.
Aftab Hussain.
EnterpriseDB. www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2007-12-05 08:35:31 | Re: TOASTed size |
Previous Message | Gregory Stark | 2007-12-05 08:24:30 | Re: TOASTed size |