From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Dickson S(dot) Guedes" <guediz(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: TODO item: Have psql show current values for a sequence |
Date: | 2008-12-15 23:41:41 |
Message-ID: | 200812152341.mBFNffC27425@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Sorry for the delay on this.
What I did was to mark the simple TODO items as done and add an
additional TODO item to list all sequence settings:
D o Have psql show current values for a sequence
o Have psql \ds show all sequences and their settings
* http://archives.postgresql.org/pgsql-hackers/2008-07/msg00916.php
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Wow. I adjusted the patch slightly and applied it; the updated version
> > is attached. We have been waiting for this to be done for quite some
> > time. Thanks.
>
> Hmm ... I don't think that this patch actually addresses the TODO item.
> The TODO item seems to have originated here
> http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/TODO.diff?r1=1.1220;r2=1.1221;f=h
> in response to this question on pgsql-novice:
>
> > How can I list all the sequences in the database, with their
> > attributes (such as last_value)? (I'm having a hard time guessing
> > 'seq-name'; the 'A_id_seq' formula did not work.)
> http://archives.postgresql.org/pgsql-novice/2004-02/msg00148.php
>
> This applied-with-little-discussion patch only shows the sequence
> values if you do a \d on a specific sequence, or \d on a wildcard
> that happens to include some sequences (and probably a lot of other
> stuff too, causing the resulting display to be far too long to be
> useful).
>
> My interpretation of the TODO item has always been that we should
> improve \ds to include all the useful information in a format that
> requires only one line per sequence. The reason it has remained
> undone for four years is that that's hard given the existing catalog
> representation of sequences and the constraints of describe.c's
> implementation. (I recall at least one failed patch that tried to
> do this, though I can't find it in the archives right now.)
>
> I find the present patch to be pretty useless: it's not a material
> advance over doing "select * from sequence-name". I think it should
> be reverted and the TODO item reinstated --- perhaps with more detail
> about what the item really is requesting.
>
> regards, tom lane
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-12-15 23:42:55 | Re: Any reason not to return row_count in cursor of plpgsql? |
Previous Message | Bruce Momjian | 2008-12-15 23:32:36 | Re: [ADMIN] shared_buffers and shmmax |
From | Date | Subject | |
---|---|---|---|
Next Message | Emmanuel Cecchet | 2008-12-16 02:05:16 | Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1 |
Previous Message | Simon Riggs | 2008-12-15 22:30:56 | Re: [PATCHES] odd output in restore mode |