Re: Range Types, constructors, and the type system

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Range Types, constructors, and the type system
Дата
Msg-id 1309500544.10707.162.camel@jdavis
обсуждение исходный текст
Ответ на Re: Range Types, constructors, and the type system  (Florian Pflug <fgp@phlo.org>)
Ответы Re: Range Types, constructors, and the type system
Список pgsql-hackers
On Thu, 2011-06-30 at 12:28 +0200, Florian Pflug wrote:
> Well, arrays are containers, and we need two values to construct a range,

What about empty ranges? What about infinite ranges?

It seems quite a bit more awkward to shoehorn ranges into an array than
to use a real type (even if it's intermediate and otherwise useless).

> Hm, I guess. I'm sill no huge fan of RANGEINPUT, but if we prevent
> it from being used as a column type and from being used as an argument
> type, then I guess it's workable...
> 
> Btw, what happened to the idea of making RANGE(...) a special syntactic
> construct instead of a normal function call? Did we discard that for its
> intrusiveness, or were there other reasons?

It has not been discarded; as far as I'm concerned it's still on the
table. The main advantage is that it doesn't require an intermediate
type, and that requiring a cast (or some specification of the range
type) might be a little more natural. The downside is that, well, it's
new syntax, and there's a little inertia there.

But if it's actually better, we should do it. If an intermediate type
seems to be problematic, or if people think it's strange to require
casting, then I think this is reasonable.

Regards,Jeff Davis



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Range Types, constructors, and the type system
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Small documentation issue