> Hi,
> 
> I'm using serial fields to generate IDs for almost all object in my
> database.  I insert an empty row, get the CURRVAL() of the sequence
> and then update to that value.
> 
> I had understood (and now, I can't find the reference to back this up)
> that serial is implemented in such a way that race conditions between
> DB connections can't happen.
> 
> Is this true?

Safe.  See FAQ item.  currval is for your backend only.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to