On Fri, 2 Mar 2001, Catalin CIOCOIU wrote:
> This method don't encourage using serial data type. Practically, in the
> joined table I can't use "serial" data type for primary key. I nead to
> use sequences by hand.
> The last solution work fine, but I need a variable for store the
> nextval('<seq name>').
>
> There is not a other solution ?
It turns out I was wrong -- using currval is session-based, as Tom Lane
has pointed out. However, still see the notes in the docs on caching
more than one values for each backend. This may or not be pertinent.
-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
While money doesn't buy love, it puts you in a great bargaining position.