Re: Using oids

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Dennis Gearon <gearond(at)fireserve(dot)net>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Using oids
Date: 2003-09-03 16:09:00
Message-ID: m3ekyx7t2b.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Dennis Gearon <gearond(at)fireserve(dot)net> writes:

> Oliver Elphick wrote:
>
> >You cannot use currval() until you have used nextval() on the same
> >sequence in the same session.

> Why is that, anyway, and why should it be?

Because that's what currval() does. It doesn't have anything to do
with sequence values in other sessions. It gives you the last value
*you* got for thee sequence, so if you haven't called nextval() yet
you should and do get an error.

Maybe it should have been called lastval(), but that could be a bit
misleading too...

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josué Maldonado 2003-09-03 16:12:28 Access to an element of array NEW in TCL
Previous Message psql-mail 2003-09-03 16:06:09 postmaster crashing

Browse pgsql-hackers by date

  From Date Subject
Next Message Bo Lorentsen 2003-09-03 16:23:21 Re: Using oids
Previous Message Tom Lane 2003-09-03 16:03:58 Re: elog.c comiple problem on AIX 4.2.1