Re: Retrieving last InsertedID : INSERT... RETURNING safe ?

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: Dave Cramer <davec(at)fastcrypt(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, <spastor(at)motionsponsor(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Retrieving last InsertedID : INSERT... RETURNING safe ?
Date: 2008-02-20 12:01:44
Message-ID: 87ir0jrg47.fsf@mnc.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer <davec 'at' fastcrypt.com> writes:

>> Well, that other solution is dangerous in case multiple inserts
>> to that table are done concurrently; a quite common usage pattern
>> with java web applications handling multiple HTTP requests with
>> concurrent java threads..
>>
> No it is not dangerous. It is the right way to do it. There is
> absolutely no danger in using currval in this manner.

Doh! Sorry for the noise. I should have double checked,
especially because Heikki is really not the kind of guy to talk
bullshit :/

--
Guillaume Cottenceau

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Tomblin 2008-02-20 12:19:16 Re: Retrieving last InsertedID : INSERT... RETURNING safe ?
Previous Message Dave Cramer 2008-02-20 11:54:20 Re: Retrieving last InsertedID : INSERT... RETURNING safe ?