Re: to_timestamp overloaded to convert from Unix epoch
От | Tom Lane |
---|---|
Тема | Re: to_timestamp overloaded to convert from Unix epoch |
Дата | |
Msg-id | 5386.1092500372@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: to_timestamp overloaded to convert from Unix epoch (Michael Glaesemann <grzm@myrealbox.com>) |
Ответы |
Re: to_timestamp overloaded to convert from Unix epoch
|
Список | pgsql-patches |
Michael Glaesemann <grzm@myrealbox.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
В списке pgsql-patches по дате отправления: