Re: Range Types, constructors, and the type system

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Range Types, constructors, and the type system
Дата
Msg-id 55DA0626-7369-491A-AAD9-0CC5903E4680@phlo.org
обсуждение исходный текст
Ответ на Re: Range Types, constructors, and the type system  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Jun29, 2011, at 18:34 , Robert Haas wrote:
> It also seems a bit strange to me that we're contemplating a system
> where users are always going to have to cast the return type.
> Generally, casts are annoying and we want to minimize the need for
> them.  I'm not sure what the alternative is, though, unless we create
> separate constructor functions for each type: int8range_cc(1, 2).

Well, if we want multiple range types per base type (which we do), then
the user needs to specify which one to use somehow. A cast seems the most
natural way to do that to me - after all, casting is *the* way to coerce
value to a certain type.

best regards,
Florian Pflug



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: Range Types, constructors, and the type system