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
обсуждение исходный текст
Ответ на Rules aren't doing what I expect  (Mark Volpe <volpe.mark@epamail.epa.gov>)
Список pgsql-sql
Mark Volpe <volpe.mark@epamail.epa.gov> 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)
Дата:
Сообщение: Problem with SQL query (eats swap)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem with SQL query (eats swap)