Re: Suggestions for 7.3 date handling - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Suggestions for 7.3 date handling
Date
Msg-id 14219.1013104730@sss.pgh.pa.us
Whole thread Raw
In response to Re: Suggestions for 7.3 date handling  (Thomas Lockhart <lockhart@fourpalms.org>)
List pgsql-hackers
Thomas Lockhart <lockhart@fourpalms.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


pgsql-hackers by date:

Previous
From: Steven Singer
Date:
Subject: Re: Replication
Next
From: Hannu Krosing
Date:
Subject: Re: Threaded PosgreSQL server