Input timestamp from epoch?

Поиск
Список
Период
Сортировка
От Bill Moseley
Тема Input timestamp from epoch?
Дата
Msg-id 20050819072740.GA16302@hank.org
обсуждение исходный текст
Ответы Re: Input timestamp from epoch?  ("A. Kretschmer" <akretschmer@despammed.com>)
Список pgsql-general
I'm entering data into a Postgresql database where the input dates are
currently in unix epoch values.  Is there a way for Postgresql to
parse that epoch into a "timestamp(0) with time zone"?

I read section 8.5 "Date/Time Types" and I can see I can input an
(well THE) epoch, and I can EXTRACT(EPOCH FROM [timestamp]), but I'm
not seeing where I can use an epoch format as input for a timestamp(0)
with time zone.


I'm not convinced that I want to store the value as a timestamp.  My
time values are all within the epoch range, so that's not an issue.
Then represent a point in time (and event), and I need to display them
in various timezones (depending on where the event is happening).
And the epoch is reasonably easy to work with.  I guess a timestamp(0)
with time zone is basically the same thing -- but gives me date
operations on Postgresql.  Probably faster for my client application
to parse epoch from the database, though.


--
Bill Moseley
moseley@hank.org


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

Предыдущее
От: Bernard
Дата:
Сообщение: Re: [BUGS] BUG #1830: Non-super-user must be able to copy from a
Следующее
От: "Sean Utt"
Дата:
Сообщение: Re: [BUGS] BUG #1830: Non-super-user must be able to copy from a file