From: Sven Köhler <skoehler@upb.de>
To: pgsql-jdbc@postgresql.org
Subject: How to get generated primary key?
Date: Sat, 19 Feb 2005 18:15:54 +0100
Message-ID: <cv7rtb$1d6$1@sea.gmane.org> (raw)
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
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-jdbc@postgresql.org
Cc: skoehler@upb.de
Subject: Re: How to get generated primary key?
In-Reply-To: <cv7rtb$1d6$1@sea.gmane.org>
References: <cv7rtb$1d6$1@sea.gmane.org>
* 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