"Milen Kulev" <makulev@xxxxxxx> writes: > What is wrong with random() ? Not guaranteed to be stable across the multiple evaluations that the rule will perform ... remember a rule is a macro and has the usual multiple-evaluation gotchas in the face of volatile arguments. regards, tom lane