Re: [BUGS] INSTEAD rule bug?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] INSTEAD rule bug?
Дата
Msg-id 9240.1058305342@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] INSTEAD rule bug?  (Dmitry Tkach <dmitry@openratings.com>)
Ответы Re: [BUGS] INSTEAD rule bug?  (Dmitry Tkach <dmitry@openratings.com>)
Список pgsql-general
Dmitry Tkach <dmitry@openratings.com> writes:
> Sure, but it is inside the rule that has 'where x is not null and y is
> not null' on it as a qualifier, so
> with my test example it should just never get executed in the first place.

You're confusing rules with triggers.  The INSERT *will* get executed;
the rule's qualifier gets moved to the WHERE of the INSERT...SELECT,
and the way you get no effect is for the qual to fail on every row the
SELECT generates.

One way to think about the problem (though I'm not sure this is right in
detail) is that there's no place to hang a top-level WHERE on a UNION.

            regards, tom lane

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

Предыдущее
От: "Derek Hamilton"
Дата:
Сообщение: Re: Firebird vrs Postgresql
Следующее
От: "Darko Prenosil"
Дата:
Сообщение: Re: Firebird vrs Postgresql