From: Ken Johanson <pg-user@kensystem.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
Date: Tue, 13 Feb 2007 16:38:26 -0700
Message-ID: <45D24BF2.6010405@kensystem.com> (raw)
In-Reply-To: <Pine.BSO.4.64.0702011325410.23261@leary2.csoft.net>
References: <4580E681.3080106@kensystem.com>
<45B9A9D6.2080100@kensystem.com>
<Pine.BSO.4.64.0701262352340.20148@leary2.csoft.net>
<45BECBA1.8080508@kensystem.com>
<Pine.BSO.4.64.0702011325410.23261@leary2.csoft.net>
Kris Jurka wrote:
>
>
> On Mon, 29 Jan 2007, Ken Johanson wrote:
>
>> Hi Kris, were you able to look at this? If time wont permit that I'll
>> dig back in; though I'd prefer not to duplicate any work your're
>> doing, of course.
>
> Taking another look the obvious problem is that you haven't touched
> AbstractJdbc3Statement.getGeneratedKeys. It still reads:
>
> public ResultSet getGeneratedKeys() throws SQLException
> {
> return createDriverResultSet(new Field[0], new Vector());
> }
>
> So an empty ResultSet is not surprising.
>
> Kris Jurka
Kris, sorry my response is late. Sometimes I get distracted by life :-)
Thanks for pointing that out. I missed the obvious. The following
replacement for that methods works; I can get the generated keys (in
conjunction with my previous patches).
I have not tested this exhaustively, nor given though about the
correctness of the null-normalization below; is this enough for you or
someone to commit the changes?
Thanks,
Ken
public ResultSet getGeneratedKeys() throws SQLException
{
return result==null ?
createDriverResultSet(new Field[0], new Vector())
: result.getResultSet();
}
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: pg-user@kensystem.com, books@ejurka.com
Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
In-Reply-To: <45D24BF2.6010405@kensystem.com>
References: <4580E681.3080106@kensystem.com> <45B9A9D6.2080100@kensystem.com> <Pine.BSO.4.64.0701262352340.20148@leary2.csoft.net> <45BECBA1.8080508@kensystem.com> <Pine.BSO.4.64.0702011325410.23261@leary2.csoft.net> <45D24BF2.6010405@kensystem.com>
* 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