How to get generated primary key? - Mailing list pgsql-jdbc

From Sven Köhler
Subject How to get generated primary key?
Date
Msg-id cv7rtb$1d6$1@sea.gmane.org
Whole thread Raw
Responses Re: How to get generated primary key?
List pgsql-jdbc
Hi,

i know about the nextval and currval functions, but i don't like them,
since they don't apply to tables. To get the generated key, you have to
know the name of the sequence, not just the name of the table.

Does the JDBC-Driver implement the getGeneratedKeys() method?
If not, does PostgreSQL provide any way to get the just generated key,
without knowing the sequencename?


Thx
   Sven

pgsql-jdbc by date:

Previous
From: peter royal
Date:
Subject: Re: DatabaseMetaData.getIndexInfo and function-based indexes
Next
From: Sven Köhler
Date:
Subject: Re: getGeneratedKeys method