"Fabrizio Mazzoni" <fabrizio@macron.com> writes:
> 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...
Just assume that *all* the columns are being updated. NEW will have the
correct value (possibly the old value) for each column. You'll probably
need one update command for each source table, but not one per column.
regards, tom lane