Re: SQL-question: returning the id of an insert querry

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Scott Chapman <scott_list(at)mischko(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: SQL-question: returning the id of an insert querry
Date: 2003-11-10 16:12:59
Message-ID: 20031110161259.GA6483@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 10, 2003 at 08:09:29AM -0800, Scott Chapman wrote:

> Chronological events here:
>
> X inserts a new record into A.
> Y inserts a new record into A.
> X fetches currval of the SA. What value does X get in this case, the one
> from X's insert or Y's?

X's.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"¿Qué importan los años? Lo que realmente importa es comprobar que
a fin de cuentas la mejor edad de la vida es estar vivo" (Mafalda)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Green 2003-11-10 16:23:09 Re: SQL-question: returning the id of an insert querry
Previous Message Scott Chapman 2003-11-10 16:09:29 Re: SQL-question: returning the id of an insert querry