Re: Have psql show current sequnce values - (Resubmission) - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Have psql show current sequnce values - (Resubmission)
Date
Msg-id 20070209002413.GT24069@alvh.no-ip.org
Whole thread Raw
In response to Re: Have psql show current sequnce values - (Resubmission)  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Have psql show current sequnce values - (Resubmission)
Re: Have psql show current sequnce values - (Resubmission)
List pgsql-patches
Bruce Momjian wrote:
>
> Your patch has been added to the PostgreSQL unapplied patches list at:
>
>     http://momjian.postgresql.org/cgi-bin/pgpatches
>
> It will be applied as soon as one of the PostgreSQL committers reviews
> and approves it.

I think the SELECT query is short on quoting and schema-qualification
for the target sequence.

Also it should probably be adjusted to use strlcpy instead of strcpy.
Coding style seems a bit off.  Also, since this is likely to be
expensive, it may be better to show the value only on \dS+, not plain
\dS.

Not sure what else.  That's what jumps at me.


I think we discussed replacing the current sequence representation with
a single relation that would contain all sequences in the database, so
that you could do "select * from pg_sequence" and get all the values in
one go.  The idea was considered not implementable at the time due to us
not having "non transactional relations", but I'd suggest adding it to
the TODO so that we don't forget later.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-patches] Phantom Command IDs, updated patch
Next
From: Bruce Momjian
Date:
Subject: Re: Have psql show current sequnce values - (Resubmission)