Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F16D99FA238 for ; Tue, 2 Jan 2007 14:58:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 54483-02 for ; Tue, 2 Jan 2007 14:57:56 -0400 (AST) X-Greylist: delayed 00:06:35.47207 by SQLgrey-1.7.4 Received: from smtp114.sbc.mail.mud.yahoo.com (smtp114.sbc.mail.mud.yahoo.com [68.142.198.213]) by postgresql.org (Postfix) with SMTP id C597B9FA433 for ; Tue, 2 Jan 2007 14:57:57 -0400 (AST) Received: (qmail 69278 invoked from network); 2 Jan 2007 18:51:17 -0000 Received: from unknown (HELO ?192.168.123.101?) (drlaz@sbcglobal.net@71.135.65.52 with plain) by smtp114.sbc.mail.mud.yahoo.com with SMTP; 2 Jan 2007 18:51:16 -0000 X-YMail-OSG: 1s4Dl20VM1lzqyUOI8jcmhCxA2y0AUL7ykDJAZqj3snkeEtMNmzv4ntotlvijDVH_HkxtgYIgv0E2CcOFldNbBE03HLUoLINTjrGd1S_mjqjEqgcWFNM2w9eeKbfSQq7H2reVvWFxhnTytA- Date: Tue, 2 Jan 2007 10:50:53 -0800 From: Andrew Lazarus X-Mailer: The Bat! (v3.95.3) Home Reply-To: Andrew Lazarus X-Priority: 3 (Normal) Message-ID: <1169425615.20070102105053@attglobal.net> To: "Jeanna Geier" CC: "Pgsql-Jdbc@Postgresql.Org" Subject: Re: Help with RULES - Please! In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200701/4 X-Sequence-Number: 16369 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