Re: Using oid as pkey - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Using oid as pkey
Date
Msg-id 20070820231059.GF27916@alvh.no-ip.org
Whole thread Raw
In response to Re: Using oid as pkey  ("D. Dante Lorenso" <dante@lorenso.com>)
List pgsql-general
D. Dante Lorenso wrote:

> I want the value of col0 returned to the application and I don't want to
> know the name of the sequence involved in the SERIAL column.  I just want
> the value inserted into the column by using just it's column name.

Use pg_get_serial_sequence().  Don't use lastval() if you can help it,
because it's a foot gun.

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/DXLWNGRJD34J
"I love the Postgres community. It's all about doing things _properly_. :-)"
(David Garamond)

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Using oid as pkey
Next
From: Rainer Bauer
Date:
Subject: Re: Using oid as pkey