From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Convert "epoch" to timestamp |
Date: | 2002-04-23 15:04:20 |
Message-ID: | 3CC577F4.BFC60907@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
...
> Can I rely on this continuing to work? Apparently
> not, because the docs say (wrt "abstime" and
> "reltime"): "Any or all of these internal types might
> disappear in a future release."
Right. But it won't disappear from the version you are running ;)
The following also works:
lockhart=# select timestamp without time zone 'today',
lockhart=> timestamp without time zone '1970-01-01'
lockhart=> + cast('1019520000' as interval);
timestamp | ?column?
---------------------+---------------------
2002-04-23 00:00:00 | 2002-04-23 00:00:00
I'm not sure what other features for integer->timestamp conversions may
be available in the future, but the above conforms to SQL9x standards so
is likely to be a good choice...
- Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-04-23 15:04:55 | Re: Convert "epoch" to timestamp |
Previous Message | Stephan Szabo | 2002-04-23 14:54:44 | Re: Convert "epoch" to timestamp |