serial type vs. sequences

From: Suchandra Thapa <s-thapa-11(at)alumni(dot)uchicago(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: serial type vs. sequences
Date: 2003-11-12 20:59:33
Message-ID: 1068670760.5193.43.camel@hepcat
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I was wondering if there was a reliable method to get the last id
inserted into a serial column in a table. I believe previous
recommendations given were to use a sequence, have your app get the
nextval for the sequence and then use that in the insert. I was
wondering if things had changed or if that is still the recommended
method.

--
Suchandra Thapa <s-thapa-11(at)alumni(dot)uchicago(dot)edu>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-11-12 21:17:31 Re: SQL-question: returning the id of an insert querry
Previous Message Jan Wieck 2003-11-12 20:50:41 Re: Proposal for a cascaded master-slave replication system