Re: lastval() - Mailing list pgsql-patches

From John Hansen
Subject Re: lastval()
Date
Msg-id 5066E5A966339E42AA04BA10BA706AE50A931C@rodrick.geeknet.com.au
Whole thread Raw
In response to lastval()  (Dennis Bjorklund <db@zigo.dhs.org>)
Responses Re: lastval()
List pgsql-patches
Bruce Momjian wrote:
> Sent: Wednesday, May 11, 2005 1:27 PM
> To: John Hansen
> Cc: Neil Conway; Dennis Bjorklund; pgsql-patches@postgresql.org
> Subject: Re: [PATCHES] lastval()
>
> John Hansen wrote:
> > Neil Conway wrote:
> > > Sent: Wednesday, May 11, 2005 10:56 AM
> > > To: Dennis Bjorklund
> > > Cc: pgsql-patches@postgresql.org
> > > Subject: Re: [PATCHES] lastval()
> > >
> > > Dennis Bjorklund wrote:
> > > > Here is a small patch that implements a function lastval()
> > > that works
> > > > just like currval() except that it give the current value
> > > of the last
> > > > sequence used by nextval().
> > >
> > > What do people think of this idea? (Tom seems opposed, I'm just
> > > wondering if there are other opinions out there.)
> >
> > I'm all for it. Even more so if the 'currval(void) called before
> > nextval(seq_name)' error message could be supressed by a
> GUC variable
> > and return 0 instead.
>
> Why zero and no error?

That's the exact behaviour of the "other database's" equivalent.
Makes porting easier, and avoids hugely annoying error messages in the
logfiles.

>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square,
> Pennsylvania 19073
>
>

pgsql-patches by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: lastval()
Next
From: Bruce Momjian
Date:
Subject: Re: lastval()