problems with rules and views - Mailing list pgsql-general

From Fabrizio Mazzoni
Subject problems with rules and views
Date
Msg-id 001801c1084f$a007f840$4f00a8c0@fabrizio
Whole thread Raw
Responses Re: problems with rules and views  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi all..
I'm having problems with a view..
I created a view which uses multiple tables and this view must be updated. I
checked the docs and it explains that i need a rule to do this..
Ok i understood it..what i don't understand is how to create this rule for
an entire view. The docs explain how to create the rule for a few fields of
the view but i need that the view must be all updatable..
Considering that my view has about 35 columns, is there a way to write a
rule that does a batch update..?? Something like:

create rule xxx as
on update to yyy <-- my view
do instead
update to xxx,qqq,zzz; <-- tables from which the view is created

Or do i have to write a statement for each column...

Awaiting for your suggestions i thank you all...

Regards

fabrizio@macrongolf.com
http://macrongolf.com
http://eteampoint.com
http://macron.com


pgsql-general by date:

Previous
From: Janning Vygen
Date:
Subject: error handling. How to?
Next
From: "angeh"
Date:
Subject: Qn on best way to upgrade from 7.0.2 to 7.0.3 on production database