Thomas Kellerer <[EMAIL PROTECTED]> 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.
I'm aware of that, I was referring to Sean's comment:
> The nifty thing about using a wrapping sequence is that the id's are > sequential across transactions, which correctly maps to the > progression of time, which obviates the need for relying on any kind > of a date column for doing syslog message ordering.
If you only use the id, you can't really tell the message ordering by the ID as id=1 could well be inserted *after* id=2 due to the wrapping of the sequence
Cheers Thomas
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster