"Arjan Tuinhout" <at(at)tuko(dot)nl> writes:
> -- However the intended code does not work: appearantly the SEQUENCE is
> update by calling the RULE; proofed by the workaround.
This is the expected behavior with a rule --- it's a macro, so multiple
references to the same input value risk multiple evaluations.
> -- Please help. Thanx. Arjan.
Use a trigger instead when your intent is to copy data from the
inserted/updated row to someplace else.
regards, tom lane