Re: Atomar SQL Statement

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "Weber, Johann (ISS Kassel)" <jweber(at)iss(dot)net>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Atomar SQL Statement
Date: 2006-07-07 13:14:16
Message-ID: 279E27B5-183F-4520-BC43-A726A50646EF@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sander Steffann 2006-07-07 13:26:47 Re: Alternative to serial primary key
Previous Message Achilleus Mantzios 2006-07-07 12:22:57 Re: Alternative to serial primary key