From: | Andrew Lazarus <drlaz(at)attglobal(dot)net> |
---|---|
To: | "Jeanna Geier" <jgeier(at)apt-cafm(dot)com> |
Cc: | "Pgsql-Jdbc(at)Postgresql(dot)Org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Help with RULES - Please! |
Date: | 2007-01-02 18:50:53 |
Message-ID: | 1169425615.20070102105053@attglobal.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)attglobal(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Jeanna Geier | 2007-01-02 21:47:50 | Calculated Fields in Postgres? |
Previous Message | Tom Lane | 2007-01-02 18:50:23 | Re: Help with RULES - Please! |