Re: get sequence value of insert command - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: get sequence value of insert command
Date
Msg-id 3CE4C46C-3A0C-11D9-8C65-000A95C88220@myrealbox.com
Whole thread Raw
In response to get sequence value of insert command  (Erik Thiele <erik@thiele-hydraulik.de>)
List pgsql-sql
On Nov 19, 2004, at 5:41 PM, Erik Thiele wrote:

> now how do i know the id of my newly inserted element? and
> how can this be done in a completely concurrency safe way?

This is a FAQ (4.15.1, among others). See currval() and nextval() in 
the documentation as well.

Michael Glaesemann
grzm myrealbox com



pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: get sequence value of insert command
Next
From: Richard Huxton
Date:
Subject: Re: get sequence value of insert command