Re: [HACKERS] New function: epoch_to_timestamp...

2003-08-16 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > [code] Seems pretty messy. I believe the standard way of doing this is regression=# create function epoch_to_timestamp(float8) returns timestamptz as ' regression'# begin regression'# return ''epoch''::timestamptz + $1 * ''1 second''::interval; regres

Re: [HACKERS] New function: epoch_to_timestamp...

2003-08-15 Thread David Fetter
On Fri, Aug 15, 2003 at 06:57:24AM -0400, Tom Lane wrote: > David Fetter <[EMAIL PROTECTED]> writes: > > Is there a reasonable way to add an optional param or two to mark > > time zones, or should that just the application programmer's > > hassle? > The return type should be timestamptz, which mak

Re: [HACKERS] New function: epoch_to_timestamp...

2003-08-15 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > Is there a reasonable way to add > an optional param or two to mark time zones, or should that just the > application programmer's hassle? The return type should be timestamptz, which makes the transformation timezone-independent.

Re: [HACKERS] New function: epoch_to_timestamp...

2003-08-14 Thread Christopher Kings-Lynne
, 2003 4:46 AM Subject: [HACKERS] New function: epoch_to_timestamp... > Kind people, > > After discussing this w/Josh yesterday, I'd like to propose a new > function for date_time. Here's the Pl/PgSQL version, warts 'n' all. > > CREATE OR REPLACE FU