On Sun, 4 Mar 2001, Peter Eisentraut wrote:
> > If I use at first the INSERT, and after SELECT MAX(ID), the result will be
> > uncertain.
>
> If you are worried about other transactions getting in the way then you
> should do SET TRANSACTION ISOLATION LEVEL SERIABLIZABLE.
I have some uncertainty about somethings that I've read from the FAQ.
If I have a client INSERT a value in a table (all happens inside a BEGIN
WORK ---- COMMIT WORK), which has a SERIAL column, and I want to
reference that serial value on another INT column which is a foreign key
of that SERIAL. Using currval() function will give me exact value as the
FAQs say, and why? Is it the transaction that makes this work this way?
Saludos... :-)
System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués email: martin@math.unl.edu.ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------