On Wed, 17 Oct 2001 [EMAIL PROTECTED] wrote: > Tony Tomov ([EMAIL PROTECTED]) reports a bug with a severity of 2 > The lower the number the more severe it is. > > Short Description > strange behavior when creting rules with serial id > > Long Description > I do not know if this is a bug, but for me this is a strange behavior. > I will describe the following process.
Yep. Both the rule's new.id and the actual id are going to increment the counter, since they'll both see the nextval for the serial sequence, the new.id is going to shove in whatever is specified for the value exactly as it was specified, so new.id is nextval(...) not the numeric result of nextval(...). You're probably going to want to use a trigger instead. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster