Re: Efficient Insert statement for one record into multiple - Mailing list pgsql-jdbc

From Albe Laurenz
Subject Re: Efficient Insert statement for one record into multiple
Date
Msg-id 52EF20B2E3209443BC37736D00C3C1380BF080CF@EXADV1.host.magwien.gv.at
Whole thread Raw
List pgsql-jdbc
>> This is _bad_.
> No, this works

Oops, indeed.

>> What if somebody did a nextval("primary_A") between the insert into A
>> and the insert into B?
> as long as you use currval then it works as advertised

Sorry, I didn't realize that currval returns the last value retrieved
_in this session_.

YOurs,
Laurenz Albe

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Efficient Insert statement for one record into multiple
Next
From: "Albe Laurenz"
Date:
Subject: Re: Efficient Insert statement for one record into multiple