Re: Postgresql "FIFO" Tables, How-To ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql "FIFO" Tables, How-To ?
Date: 2003-07-16 22:27:28
Message-ID: 25649.1058394448@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rui Pires 2003-07-16 22:56:25 ERROR: UNIQUE constraint matching given keys for referenced table "rl_voltas" not found
Previous Message Tom Lane 2003-07-16 22:07:22 Re: Billions of records?