> > > 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?
> It's the "interval" part that's troubling me, since it appears nowhere in
> the original expression.
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").
We could fairly easily define a date_part() for the time and timetz data
types.
- Thomas