View Single Post

   
  #4 (permalink)  
Old 04-16-2008, 12:59 AM
Dave Cramer
 
Posts: n/a
Default Re: Retrieving last InsertedID : INSERT... RETURNING safe ?

> 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Reply With Quote