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

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Retrieving last InsertedID : INSERT... RETURNING safe ?
Date: 2008-02-20 11:54:20
Message-ID: 55C92F71-0317-4E91-A092-C22A7A2F1FD8@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 Guillaume Cottenceau 2008-02-20 12:01:44 Re: Retrieving last InsertedID : INSERT... RETURNING safe ?
Previous Message Dave Cramer 2008-02-20 11:53:30 Re: Retrieving last InsertedID : INSERT... RETURNING safe ?