Thomas Kellerer <spam_eater(at)gmx(dot)net> writes:
> But isn't that exactly the problem? Once the sequence wraps around how do I
> know that id=1 is actually later then id=2 without a date column?
If you use an int8 sequence column, I doubt you need to worry about
wraparound. A date column probably hasn't got enough resolution,
so the other workable approach is to use a timestamp column. Ends up
costing 8 bytes either way.
regards, tom lane