Re: Patch for Statement.getGeneratedKeys() - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Patch for Statement.getGeneratedKeys()
Date
Msg-id Pine.BSO.4.64.0801110022310.3943@leary.csoft.net
Whole thread Raw
In response to Re: Patch for Statement.getGeneratedKeys()  (Ken Johanson <pg-user@kensystem.com>)
Responses Re: Patch for Statement.getGeneratedKeys()  (Ken Johanson <pg-user@kensystem.com>)
List 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


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Patch for Statement.getGeneratedKeys()
Next
From: Kris Jurka
Date:
Subject: Re: An I/O error occured while sending to the backend.