Re: Update ResultSet - Mailing list pgsql-jdbc

From tivvpgsqljdbc@gtech-ua.com
Subject Re: Update ResultSet
Date
Msg-id 470CD623.4050109@gtech-ua.com
Whole thread Raw
In response to Re: Update ResultSet  ("Christian Rengstl" <Christian.Rengstl@klinik.uni-regensburg.de>)
Responses Re: Update ResultSet
List pgsql-jdbc
Hi.

I'd create an updatable server-side view and issue select against it.
Not sure if primary key information will be propagated, but you can try.

Christian Rengstl wrote:
> And I suppose there is no reasonable workaround, is there?
>
>

>
>>>> On Wed, Oct 10, 2007 at  2:53 PM, in message
>>>>
> <470CCB67.80106@enterprisedb.com>,
> "Heikki Linnakangas" <heikki@enterprisedb.com> wrote:
>
>> Only simple result sets coming from a single table, with no joins,
>>
> are
>
>> updateable. Granted, the error message is misleading. The driver has
>>
> to
>
>> parse the query, to extract the name of the table to update or throw
>>
> an
>
>> error if there's more than one table involved. In this case, it
>>
> doesn't
>
>> understand the INNER JOIN, and therefore you get the misleading
>>
> error
>
>> message instead of this: "ResultSet is not updateable.  The query
>>
> that
>
>> generated this result set must select only one table, and must
>>
> select
>
>> all primary keys from that table. See the JDBC 2.1 API
>>
> Specification,
>
>> section 5.6 for more details."
>>



pgsql-jdbc by date:

Previous
From: "Christian Rengstl"
Date:
Subject: Re: Update ResultSet
Next
From: Marek Lewczuk
Date:
Subject: AbstractJdbc2Array - another patch