Just wanted to add that PHP has a GETLASTOID function that will work
(after an insert) even if you don't use sequences/serials.
--
Jean-Christophe Boggio
[EMAIL PROTECTED]
Independant Consultant and Developer
Delphi, Linux, Perl, PostgreSQL
---(end of
Sipos Andras writes:
create table basket (
id serial NOT NULL PRIMARY KEY,
timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
How can I make a one step insert into the table and get values of 'ID' ?
I am trying to find a similar solution as in the oracle's INSERT ...
Title: RE: [GENERAL] INSERT ... RETURNING as Oracle
And using MAX is also horrifically slow once you start having any significant volumes of data.
Why not write a function to add the info, which selects from a sequence, inserts the new row using the sequence number, and then returns