serial type; race conditions

From: jkakar(at)expressus(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: serial type; race conditions
Date: 2001-03-26 21:27:28
Message-ID: 20010326132728.A15965@expressus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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?

Thanks,
Jamu.

--
Jamu Kakar (Developer) Expressus Design Studio, Inc.
jkakar(at)expressus(dot)com 708-1641 Lonsdale Avenue
V: (604) 903-6994 North Vancouver, BC, V7M 2J5

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-03-26 21:35:55 Re: Function Vanished
Previous Message Josh Berkus 2001-03-26 21:25:29 Re: Function Vanished