> > Oh yeah. We don't have a date_part(units, time) function defined, so it
> > is getting converted to interval (which in other contexts *does* have
> > some usefulness as a "time equivalent").
> You're going to have an extremely hard time convincing me of that.
OK, thanks for the warning. I'll
Peter Eisentraut <[EMAIL PROTECTED]> 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 ...
regards, tom lane
---(end of broadcast)
Tom Lane writes:
> Peter Eisentraut <[EMAIL PROTECTED]> 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, min
Thomas Lockhart writes:
> Oh yeah. We don't have a date_part(units, time) function defined, so it
> is getting converted to interval (which in other contexts *does* have
> some usefulness as a "time equivalent").
You're going to have an extremely hard time convincing me of that.
> We could fair
> > > peter=# SELECT EXTRACT(DOW FROM TIME '20:38:40');
> > > ERROR: Interval units 'dow' not recognized
> > > The expression is nonsensical, but so is the result.
> > Hmm. Why is the result nonsensical? "day of week" does not have meaning
> > for intervals, so it should not be recognized, right?
Thomas Lockhart writes:
> > peter=# SELECT EXTRACT(DOW FROM TIME '20:38:40');
> > ERROR: Interval units 'dow' not recognized
> > The expression is nonsensical, but so is the result.
>
> Hmm. Why is the result nonsensical? "day of week" does not have meaning
> for intervals, so it should not be r
> Just updated...
> peter=# SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
> ERROR: Timestamp with time zone units 'dow' not recognized
> This is documented to work.
Ah, I broke this with some recent additions to implement more ISO
conventions (I changed the behavior of the date/time