Re: EXTRACT broken - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: EXTRACT broken
Date
Msg-id Pine.LNX.4.30.0110132124220.643-100000@peter.localdomain
Whole thread Raw
In response to EXTRACT broken  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Tom Lane writes:

> Peter Eisentraut <peter_e@gmx.net> writes:
> > I had figured that time would be cast to timestamp.
>
> How would you do that?  With no date available, you're short all the
> high-order bits ...

For the purpose of extracting the fields that time does provide, namely
hour, minute, and second, it wouldn't matter.  At least it gives me a much
better feeling than casting to interval, which is a completely different
kind of quantity.

Of course, a separate date_part for time and date would make the most
sense.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_client_encoding
Next
From: Peter Eisentraut
Date:
Subject: Re: FAQ error