Re: Patch for Statement.getGeneratedKeys()

From: Kris Jurka <books(at)ejurka(dot)com>
To: Ken Johanson <pg-user(at)kensystem(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Patch for Statement.getGeneratedKeys()
Date: 2008-01-11 05:24:35
Message-ID: Pine.BSO.4.64.0801110022310.3943@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

On Wed, 9 Jan 2008, Ken Johanson wrote:

>> the requirement that a query uses a completely qualified name
>> database.schema.table is quite onerous.
>>
>
> What are your thoughts on this? Should it be possible/safe going forward to
> not supply the fully qualified table in the case of:
>
> Statement.executeUpdate(String sql, int columnIndexes[])
>
> If you can recommend a simpler strategy I will try it. If we can avoid the
> round trip also that would be great.
>

Writing "RETURNING *" will return more data than you need, but it has the
plus of not requiring you to know anything about the underlying table
columns. Once the full result is returned you would need to strip out
only the parts specified in columnIndexes and either create a new
ResultSet or a wrapper around the returned ResultSet.

Kris Jurka

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Schwarzer 2008-01-11 05:52:21 Re: Installation problem: failed to initialize lc_messages to ""
Previous Message Kris Jurka 2008-01-11 05:22:09 Re: Patch for Statement.getGeneratedKeys()

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2008-01-11 05:31:41 Re: An I/O error occured while sending to the backend.
Previous Message Kris Jurka 2008-01-11 05:22:09 Re: Patch for Statement.getGeneratedKeys()