Re: Range-Types in 9.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Range-Types in 9.2
Дата
Msg-id 4095.1344018316@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Range-Types in 9.2  ("Marc Mamin" <M.Mamin@intershop.de>)
Список pgsql-general
"Marc Mamin" <M.Mamin@intershop.de> writes:
> Is there some logical reason why no function width(range) was added to the bundle ?

It's not well-defined for all base types.  A range type only presumes
the underlying type has comparison, not that it has subtraction.
Moreover, there's no way to define range(anyrange) polymorphically,
because the types that do have subtraction don't necessarily have
operators that return the same type.  (timestamptz being the first
counterexample.)

            regards, tom lane

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

Предыдущее
От: "Marc Mamin"
Дата:
Сообщение: Re: Range-Types in 9.2
Следующее
От: Mike Christensen
Дата:
Сообщение: Another question about Range types