At 17:24 16.06.2003, Jodi Kanter said:
--------------------[snip]-------------------- 

>If I'm using transactions (not autocommit), are sequences atomic?

Yes

>In other words, after inserting a record to a table that 
>uses sequence A, am I guaranteed that select last_value on 
>sequence A is atomic, and cannot be interfered with by other 
>transactions using that same sequence? Sequence A is used by
>several tables.

Yes. But you should use currval('seq_name') since this guarantees to return
the last value returned to the current connection. Check the recent posts -
there was a discussion on just this topic.

-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to