Re: Data type confusion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Data type confusion
Дата
Msg-id 7080.997051520@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Data type confusion  ("Josh Berkus" <josh@agliodbs.com>)
Ответы Re: Data type confusion
Список pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> If
> INTERVAL / INTEGER = INTERVAL

Actually the operator appears to be INTERVAL / FLOAT8.

> then why does
> INTERVAL / INTERVAL = ERROR?

Because no one got around to creating an INTERVAL / INTERVAL operator.
There are plenty of such gaps in our operator set...

> Shouldn't
> INTERVAL / INTERVAL = INTEGER?

I'd think the output should be FLOAT8, myself, since the result
could be fractional.

Anyway, the generic response to such questions is "feel free to
code it up and submit a patch".
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Allan Engelhardt
Дата:
Сообщение: Re: Data type confusion
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: Data type confusion