I assume that if I keep on adding to an INT4, at some point it will roll over and become negative, and then if I add some more, it could become positive. Is there a way to prevent this? Ie, I would like for it to end with an error instead of wrapping around. Or is there a way to check for this condition before I do the addition? Is there a way to put a constraint on a variable, such that it's always positive? Thanks ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html