pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Glaesemann <grzm@seespotcode.net>
To: Weber, Johann (ISS Kassel) <jweber@iss.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Atomar SQL Statement
Date: Fri, 7 Jul 2006 09:14:16 -0400
Message-ID: <279E27B5-183F-4520-BC43-A726A50646EF@seespotcode.net> (raw)
In-Reply-To: <B8ADDBDA8696F546BDAC69B469D7F0512E06F3@kasmaiexcp01.iss.net>
References: <B8ADDBDA8696F546BDAC69B469D7F0512E06F3@kasmaiexcp01.iss.net>


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




view thread (6+ messages)  latest in thread

Message-ID: <279E27B5-183F-4520-BC43-A726A50646EF@seespotcode.net>
Permalink:  ../279E27B5-183F-4520-BC43-A726A50646EF@seespotcode.net/
Also on:    postgresql.org/message-id/279E27B5-183F-4520-BC43-A726A50646EF@seespotcode.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: grzm@seespotcode.net, jweber@iss.net
  Subject: Re: Atomar SQL Statement
  In-Reply-To: <279E27B5-183F-4520-BC43-A726A50646EF@seespotcode.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox