Re: Have psql show current sequnce values - (Resubmission)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)COM>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Have psql show current sequnce values - (Resubmission)
Date: 2007-02-09 00:32:19
Message-ID: 200702090032.l190WJQ22793@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera wrote:
> 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.

Yep, for a small patch, it needs major cleanups.

> 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.

OK:

* Consider placing all sequences in a single table, now that system
tables are full transactional

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.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-02-09 00:36:20 Re: Proposal: Commit timestamp
Previous Message Jan Wieck 2007-02-09 00:28:28 Re: Proposal: Commit timestamp

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-09 00:55:39 Re: SSL enhancement patch ver.2
Previous Message Alvaro Herrera 2007-02-09 00:24:13 Re: Have psql show current sequnce values - (Resubmission)