From: Paul Thomas <paul@tmsl.demon.co.uk>
To: pgsql-jdbc @ postgresql . org <pgsql-jdbc@postgresql.org>
Subject: Re: getGeneratedKeys()
Date: Tue, 30 Dec 2003 23:56:23 +0000
Message-ID: <20031230235623.A27715@bacon> (raw)
In-Reply-To: <33309.213.89.23.209.1072826327.squirrel@www.dsv.su.se>
References: <3FF1C0EE.4010107@dsv.su.se>
<Pine.LNX.4.33.0312301523060.5331-100000@leary.csoft.net>
<32899.213.89.23.209.1072821322.squirrel@www.dsv.su.se>
<1216.192.168.0.64.1072824461.squirrel@mercury.wardbrook.com>
<33309.213.89.23.209.1072826327.squirrel@www.dsv.su.se>
On 30/12/2003 23:18 henr-and@dsv.su.se wrote:
> > Can you do the insert using a function instead, and return the currval
> > on the underlying sequence?
> >
> > John
> >
>
> I'm not sure what you mean. A stored procedure?
>
> The good thing about getGeneratedKeys() is that you don't have to write
> DB-specific code.
I always thought that auto-generated keys _are_ db specific. Where are
they defined in SQL92/99?
Back to your problem: Does your app have to support different DBMSs or is
it PostgreSQL-only?
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+
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: paul@tmsl.demon.co.uk
Subject: Re: getGeneratedKeys()
In-Reply-To: <20031230235623.A27715@bacon>
References: <3FF1C0EE.4010107@dsv.su.se> <Pine.LNX.4.33.0312301523060.5331-100000@leary.csoft.net> <32899.213.89.23.209.1072821322.squirrel@www.dsv.su.se> <1216.192.168.0.64.1072824461.squirrel@mercury.wardbrook.com> <33309.213.89.23.209.1072826327.squirrel@www.dsv.su.se> <20031230235623.A27715@bacon>
* 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