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.

Attachment: signature.asc
Description: Digital signature

Reply via email to