Re: Rules aren't doing what I expect

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Rules aren't doing what I expect
Дата
Msg-id
2085.966003030@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: Rules aren't doing what I expect Mark Volpe <volpe.mark@epamail.epa.gov>
Mark Volpe  writes:
> When I try this out, however, the rule seems to use the original
> value, rather than the "corrected" value.

Queries added by non-INSTEAD rules are always performed before the
initially-given query, so you're right, the rule will see the unmodified
value.

I'd suggest folding the log-entry-making into your trigger, actually.
If you have a trigger anyway then the insert into t1_log is only one
more line in that trigger procedure...
		regards, tom lane

В списке pgsql-sql по дате отправления
От: pgsql-sql@ruby.sartorelli.gen.nz (Mailing List Expander)
Дата:
От: Tom Lane
Дата:
FAQ