From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | lockhart(at)fourpalms(dot)org |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Suggestions for 7.3 date handling |
Date: | 2002-02-07 17:58:50 |
Message-ID: | 14219.1013104730@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Lockhart <lockhart(at)fourpalms(dot)org> writes:
> thomas=# create or replace function date_part(text,int4)
> thomas-# returns float8 as
> thomas-# 'select date_part($1, timestamp without time zone \'epoch\'
> thomas-# + (interval '1 sec' * $2));' language 'sql';
Or just
regression=# create or replace function date_part(text,int4)
regression-# returns float8 as
regression-# 'select date_part($1, $2::abstime::timestamp)'
regression-# language sql;
Thomas, of course, would really like to get rid of type abstime,
but it's so dang useful (for exactly this reason) that I don't
expect it to disappear until Unixen move away from 4-byte time_t.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-07 18:40:34 | Re: Automatic transactions in psql |
Previous Message | Steven Singer | 2002-02-07 17:48:51 | Re: Replication |