sequence - Mailing list pgsql-admin

From Vladimir V. Zolotych
Subject sequence
Date
Msg-id 38FC094F.EBF59629@eurocom.od.ua
Whole thread Raw
Responses Re: sequence  (Andrew Perrin - Demography <aperrin@demog.berkeley.edu>)
List pgsql-admin
Hello all

What is the safe way to add record to a table
and get it id (generated by a sequence) consistently?

E.g.
1) add record (INSERT INTO...) to a table
(the record's id will be generated
automatically due the ``id SERIAL'' column were defined).

2) get the id of a just created record.

Thanks
 

-- 
Vladimir Zolotych                         gsmith@eurocom.od.ua
 

pgsql-admin by date:

Previous
From: "Rainer Mager"
Date:
Subject: RE: Maintenance
Next
From: Raul Carvalho
Date:
Subject: RE: Maintenance