Re: partitioning / rules - strange behavior

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: partitioning / rules - strange behavior
Дата
Msg-id 20070207220207.GC25868@svana.org
обсуждение исходный текст
Ответ на Re: partitioning / rules - strange behavior  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: partitioning / rules - strange behavior  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-general
On Wed, Feb 07, 2007 at 08:09:57PM +0100, Tomas Vondra wrote:
> But I don't understand why the nextval('sessions_id_seq') is evaluated
> multiple times? Even when I do

RULE expand like macros, so every expression passed in is simply copied
to each place, leading to multiple evaluations.

If you've played with the C preprocessor: that has the same basic
problem.

It's rather unexpected for novices, which is why triggers are usually
recommended.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Michael Guerin
Дата:
Сообщение: Re: Database corruption.
Следующее
От: rob_spellberg
Дата:
Сообщение: a request for the 8.1.7 and 8.2.2 tarballs and the good reasons why