auto generated keys

From: "Paul Sorenson" <pauls(at)classware(dot)com(dot)au>
To: "postgresql jdbc" <pgsql-jdbc(at)postgresql(dot)org>
Subject: auto generated keys
Date: 2003-03-19 08:35:03
Message-ID: 004001c2edf2$6fe8c6f0$c48b0fcb@home.classware.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Would I be right in assuming the calls relating to retrieving auto generated
keys are non-trivial to implement?

I have a somewhat klunky hack in an application which immediately after
inserting a row into a table with a "serial" for the primary key I do a
select based on values I know to be unique (at least for the table in
question). I also thought about managing the sequence numbers
programmatically but the other method worked out ok.

So
a) Any ideas about the timeframe for auto generated key retrieval?

b) Is there a "recommended" method for retrieving auto generated keys
with PostgreSQL and JDBC?

paul

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Davide Romanini 2003-03-19 09:35:08 JDBC driver, PGSQL 7.3.2 and accents characters
Previous Message Tom Lane 2003-03-19 05:53:42 Re: Follow-up OpenOffice and Postgres 7.3.2