Re: EXTRACT broken
| От | Thomas Lockhart |
|---|---|
| Тема | Re: EXTRACT broken |
| Дата | |
| Msg-id | 3BC681B0.C404E845@fourpalms.org обсуждение исходный текст |
| Ответ на | Re: EXTRACT broken (Peter Eisentraut <peter_e@gmx.net>) |
| Ответы |
Re: EXTRACT broken
|
| Список | pgsql-hackers |
> > > 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
В списке pgsql-hackers по дате отправления: