On Sat, Jan 15, 2005 at 06:34:11PM -0300, Alvaro Herrera wrote:
> On Sat, Jan 15, 2005 at 03:11:22PM -0600, Jim C. Nasby wrote:
>
> > Would it make sense to have a version of currval that will only return
> > one value in a statement/transaction? So the first time it's called it
> > remembers what currval for that sequence is and always returns the same
> > value?
>
> What would nextval() do in that case? Return the nextval on the first
> call, and act like currval() from then until the end of the transaction?
I'm not sure which would be best. It could either do what you suggest,
or it could operate as normal, or it could possibly throw an error if
run a second time.
--
Jim C. Nasby, Database Consultant decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"