Re: Using Epoch to save timestamps in 4 bytes?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using Epoch to save timestamps in 4 bytes?
Дата
Msg-id 9798.1210469849@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using Epoch to save timestamps in 4 bytes?  (Francisco Reyes <lists@stringsutils.com>)
Список pgsql-general
Francisco Reyes <lists@stringsutils.com> writes:
> Given that all of our dates will fall within what we can store in 4bytes,
> what would be the easiest way to use epoch as a timestamp?

Well, if you're bound and determined to create a Y2038 problem for
yourself, you could use the legacy "abstime" datatype.

Actually, that choice will blow up on you rather sooner than 2038,
since I'm sure we'll pull abstime from the system well before it
actually starts failing to represent now().  But future-proofing
doesn't seem to be part of your design goals, so you might as well
use it while it's there.

            regards, tom lane

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

Предыдущее
От: Francisco Reyes
Дата:
Сообщение: Re: Using Epoch to save timestamps in 4 bytes?
Следующее
От: "Postgres User"
Дата:
Сообщение: Scripting function definitions as SQL?