Re: DO INSTEAD and conditional rules
От
Neil Conway
Тема
Re: DO INSTEAD and conditional rules
Дата
Msg-id
426DDB5F.30101@samurai.com
Ответ на
Re: DO INSTEAD and conditional rules (Tom Lane)
Список
Дерево обсуждения
Re: DO INSTEAD and conditional rules "Zeugswetter Andreas DAZ SD" <ZeugswetterA@spardat.at>
Tom Lane wrote: > DO INSTEAD means that the *original* query will not execute; it does > not suppress actions produced by other rules. If we did not define > it that way, I think your example would have to error out --- how > would you choose which INSTEAD rule wins? I think DO INSTEAD should control whether the original query is added to the set of query trees produced by the rule. Since we apply rules in alphabetical order, I would expect the first rule's conditional to be checked; when it matches, we would apply the rule and replace the original query with the rule's action (since it is DO INSTEAD). We would then apply rules to the result of the first rule; since no more rules can be applied, the resulting query would be the result of the first rule. -Neil
В списке pgsql-hackers по дате отправления