Search Postgresql Archives

Re: Using oid as pkey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux