From: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz>, Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: partitioning / rules - strange behavior |
Date: | 2007-02-07 22:19:15 |
Message-ID: | 45CA5063.7010405@fuzzy.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>> 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.
I wouldn't call myself a novice, but yes - this surprised me a little.
Now it seems so natural ... I think there should be a clear explanation
/ example in the docs about this - I've read the documentation on RULE
sytem several times and as far as I remember.
Anyway thanks to those helped me to solve this problem, now it works as
expected.
Tomas
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2007-02-07 22:23:35 | Re: partitioning / rules - strange behavior |
Previous Message | rob_spellberg | 2007-02-07 22:12:20 | a request for the 8.1.7 and 8.2.2 tarballs and the good reasons why |