From: Andrew Lazarus <drlaz@attglobal.net>
To: Jeanna Geier <jgeier@apt-cafm.com>
Cc: Pgsql-Jdbc@Postgresql.Org <pgsql-jdbc@postgresql.org>
Subject: Re: Help with RULES - Please!
Date: Tue, 2 Jan 2007 10:50:53 -0800
Message-ID: <1169425615.20070102105053@attglobal.net> (raw)
In-Reply-To: <FBEGJLLJBCOMCDBJHIMEAEEDCCAA.jgeier@apt-cafm.com>
References: <FBEGJLLJBCOMCDBJHIMEAEEDCCAA.jgeier@apt-cafm.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: drlaz@attglobal.net, jgeier@apt-cafm.com
Subject: Re: Help with RULES - Please!
In-Reply-To: <1169425615.20070102105053@attglobal.net>
References: <FBEGJLLJBCOMCDBJHIMEAEEDCCAA.jgeier@apt-cafm.com> <1169425615.20070102105053@attglobal.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox