Re: rules: evaluate inputs in advance

Поиск
Список
Период
Сортировка
От Markus Schiltknecht
Тема Re: rules: evaluate inputs in advance
Дата
Msg-id 1147443720.18683.31.camel@fotomarburg
обсуждение исходный текст
Ответ на Re: rules: evaluate inputs in advance  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: rules: evaluate inputs in advance  (Richard Broersma Jr <rabroersma@yahoo.com>)
Re: rules: evaluate inputs in advance  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
On Fri, 2006-05-12 at 15:57 +0200, Martijn van Oosterhout wrote:
> It's a known problem. It's also one of the reasons why triggers are
> recommended over rules. And it's not desirable behaviour.

Well, triggers cannot be used to create writeable views, can they?

> There have been discussions about the problems

Do you have some pointers here? I did not find relevant discussions in
the archives (of gmane.org)

> Yet no-one has come up with an
> alternative that covers the current uses...

As far as I know, the rewriter simply copies plan tree nodes. I thought
about inserting an 'evaluate-only-once' node which is linked from all
rules and points to the expression to evaluate (instead of copying the
complete explession and evaluating it several times in the executor).

Regards

Markus



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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: rules: evaluate inputs in advance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Connecting to PostgreSQL on Linux with windows