Re: Efficient Insert statement for one record into multiple

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Dave Cramer *EXTERN*" <pg(at)fastcrypt(dot)com>
Cc: "Roland Walter *EXTERN*" <roland(dot)walter(dot)rwa(at)gmx(dot)net>, "Peter Neu" <peter(dot)neu(at)gmx(dot)net>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Efficient Insert statement for one record into multiple
Date: 2006-12-18 15:06:03
Message-ID: 52EF20B2E3209443BC37736D00C3C1380BF080CF@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Albe Laurenz 2006-12-18 15:36:11 Re: Efficient Insert statement for one record into multiple
Previous Message Dave Cramer 2006-12-18 14:50:13 Re: Efficient Insert statement for one record into multiple