Input timestamp from epoch? - Mailing list pgsql-general

From Bill Moseley
Subject Input timestamp from epoch?
Date
Msg-id 20050819072740.GA16302@hank.org
Whole thread Raw
Responses Re: Input timestamp from epoch?  ("A. Kretschmer" <akretschmer@despammed.com>)
List 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 by date:

Previous
From: Bernard
Date:
Subject: Re: [BUGS] BUG #1830: Non-super-user must be able to copy from a
Next
From: "Sean Utt"
Date:
Subject: Re: [BUGS] BUG #1830: Non-super-user must be able to copy from a file