Re: Last value inserted

From: Richard Huxton <dev(at)archonet(dot)com>
To: MaRCeLO PeReiRA <gandalf_mp(at)yahoo(dot)com(dot)br>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Last value inserted
Date: 2004-11-11 18:44:27
Message-ID: 4193B30B.40905@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

MaRCeLO PeReiRA wrote:

> How can I now (for sure) with value was generated by
> the sequence to fill the field ID?
>
> (There is lots of users using the software at the same
> time, so I am not able to use the last_value()
> function on the sequence.)

Yes you are nextval()/currval() are multi-user safe. They return the
next/current value *in the current connection*.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Welty 2004-11-11 18:50:09 Re: Lionel Lauer 58 Gore Street Fitzroy, Victoria Australia 3065
Previous Message Robert Fitzpatrick 2004-11-11 18:40:33 DROP DATABASE, but still there