Re: Help with RULES - Please!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:23
Message-ID: 7283.1167763823@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Jeanna Geier" <jgeier(at)apt-cafm(dot)com> writes:
> Here is my elementdata.measurement View (as stored in Case Studio):
> Create view "elementdata"."measurement" As
> ...
> And here is the update_measurement RULE (as stored in Case Studio):
> CREATE RULE update_measurement AS ON UPDATE
> TO elementdata.measurement
> DO INSTEAD (UPDATE element SET height = (new.height_lin / (SELECT
> ...

That rule should certainly trap any attempted update to
elementdata.measurement. I suppose the error message is being thrown
about some other view ... it's unfortunate that it doesn't tell you
which one :-(. Anyway the message definitely indicates an attempted
update against some view that has not got an unconditional ON UPDATE DO
INSTEAD rule, and this one does.

regards, tom lane

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andrew Lazarus 2007-01-02 18:50:53 Re: Help with RULES - Please!
Previous Message Kevin Murphy 2007-01-02 18:49:59 ClassCastException DelegatingPreparedStatement