| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
| Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: to_timestamp overloaded to convert from Unix epoch |
| Date: | 2004-08-14 16:19:32 |
| Message-ID: | 5386.1092500372@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Michael Glaesemann <grzm(at)myrealbox(dot)com> writes:
> On Aug 14, 2004, at 6:50 PM, Christopher Kings-Lynne wrote:
>> Maybe you don't need to override to_timestamp, and you can just add a
>> new code to the format string that to_timestamp understands, ie 'e' or
>> something or 'u' that means 'unix timestamp'?
> Are you thinking something like to_timestamp(200120400,'unix')?
I didn't see the point of that suggestion either. People who want to do
this conversion usually want to start with a number, not a string, so
it wouldn't be part of the existing to_timestamp function anyway.
There was however another patch submitted recently that seemed to
duplicate yours functionally but used a different syntax --- I think the
guy had started by looking at extract(epoch from timestamp) rather than
to_timestamp.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Philip Warner | 2004-08-14 16:28:03 | pg_restore recognizing $-quotes |
| Previous Message | Andrew Dunstan | 2004-08-14 13:26:28 | Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to |