Re: Atomar SQL Statement - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: Atomar SQL Statement
Date
Msg-id 279E27B5-183F-4520-BC43-A726A50646EF@seespotcode.net
Whole thread Raw
In response to Atomar SQL Statement  ("Weber, Johann (ISS Kassel)" <jweber@iss.net>)
Responses Re: Atomar SQL Statement
List pgsql-sql
On Jul 7, 2006, at 7:55 , Weber, Johann (ISS Kassel) wrote:

> My concern: in a multi threaded environment, can a second thread
> interrupt this statement and eventually insert the same email  
> address in
> the table with a different id? Or is this statement atomar?

You're safe. Take a look at the FAQ entries on SERIAL:

http://www.postgresql.org/docs/faqs.FAQ.html#item4.11.2

Hope this helps.

Michael Glaesemann
grzm seespotcode net



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Alternative to serial primary key
Next
From: "Sander Steffann"
Date:
Subject: Re: Alternative to serial primary key