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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgresql "FIFO" Tables, How-To ?
Дата
Msg-id 25649.1058394448@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Postgresql "FIFO" Tables, How-To ?  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Postgresql "FIFO" Tables, How-To ?  (Thomas Kellerer <spam_eater@gmx.net>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Billions of records?
Следующее
От: "Rui Pires"
Дата:
Сообщение: ERROR: UNIQUE constraint matching given keys for referenced table "rl_voltas" not found