Re: Help with RULES - Please! - Mailing list pgsql-jdbc

From Andrew Lazarus
Subject Re: Help with RULES - Please!
Date
Msg-id 1169425615.20070102105053@attglobal.net
Whole thread Raw
In response to Help with RULES - Please!  ("Jeanna Geier" <jgeier@apt-cafm.com>)
List pgsql-jdbc
The JDBC driver makes its own determination of whether a recordset is
updateable, and it doesn't know about the RULEs on VIEWs. I found I
could fool it by creating an extra "oid" column in the view that I
knew was unique. The driver will use a column labeled oid as a primary
key for sending UPDATE commands to the back end.

In your code, you could probably just have SELECT element.elementid AS
oid, element.elemendid, etc. and change none of the rest of your code.

I don't know if this kludge is documented or guaranteed to work in
future versions.

Andrew Lazarus   drlaz@attglobal.net


pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Help with RULES - Please!
Next
From: "Jeanna Geier"
Date:
Subject: Calculated Fields in Postgres?