From: Vladimir V. Zolotych <gsmith@eurocom.od.ua>
To: pgsql-admin@postgresql.org
Subject: sequence
Date: Tue, 18 Apr 2000 10:05:51 +0300
Message-ID: <38FC094F.EBF59629@eurocom.od.ua> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gsmith@eurocom.od.ua
Subject: Re: sequence
In-Reply-To: <38FC094F.EBF59629@eurocom.od.ua>
References: <38FC094F.EBF59629@eurocom.od.ua>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox