drop function date_part(text,time);

create function date_part(text,time) returns double precision as '
select date_part($1, cast((cast($2 as text) || ''+00'') as time with time zone));
' language 'sql';
