Re: Postgresql "FIFO" Tables, How-To ?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-general@postgresql.org
Date: 2003-07-16T22:27:28Z
Lists: pgsql-general
Thomas Kellerer <spam_eater@gmx.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