Re: problems with rules and views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: problems with rules and views
Дата
Msg-id 12155.994688457@sss.pgh.pa.us
обсуждение исходный текст
Ответ на problems with rules and views  ("Fabrizio Mazzoni" <fabrizio@macron.com>)
Список pgsql-general
"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

В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Wampler
Дата:
Сообщение: fmgr_info: function 2714160: cache lookup failed
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Transactions in rules..