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

From: Dave Cramer <davec(at)fastcrypt(dot)com>
To: Guillaume Cottenceau <gc(at)mnc(dot)ch>
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 11:53:30
Message-ID: 0C2798BB-F7F0-4B4B-92E9-358D78D1CDE4@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> 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.

Dave

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2008-02-20 11:54:20 Re: Retrieving last InsertedID : INSERT... RETURNING safe ?
Previous Message Guillaume Cottenceau 2008-02-20 11:37:44 Re: Retrieving last InsertedID : INSERT... RETURNING safe ?