Re: Singleton range constructors versus functional coercion notation

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Singleton range constructors versus functional coercion notation
Дата
Msg-id
23450.1321736235@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Singleton range constructors versus functional coercion notation Tom Lane <tgl@sss.pgh.pa.us>
Re: Singleton range constructors versus functional coercion notation Jeff Davis <pgsql@j-davis.com>
Re: Singleton range constructors versus functional coercion notation Tom Lane <tgl@sss.pgh.pa.us>
Re: Singleton range constructors versus functional coercion notation Jeff Davis <pgsql@j-davis.com>
Re: Singleton range constructors versus functional coercion notation Robert Haas <robertmhaas@gmail.com>
Re: Singleton range constructors versus functional coercion notation Tom Lane <tgl@sss.pgh.pa.us>
Re: Singleton range constructors versus functional coercion notation Robert Haas <robertmhaas@gmail.com>
Re: Singleton range constructors versus functional coercion notation Jeff Davis <pgsql@j-davis.com>
Re: Singleton range constructors versus functional coercion notation Tom Lane <tgl@sss.pgh.pa.us>
Re: Singleton range constructors versus functional coercion notation Dean Rasheed <dean.a.rasheed@gmail.com>
Re: Singleton range constructors versus functional coercion notation Florian Pflug <fgp@phlo.org>
Re: Singleton range constructors versus functional coercion notation Pavel Stehule <pavel.stehule@gmail.com>
Jeff Davis  writes:
> On Sat, 2011-11-19 at 12:27 -0500, Tom Lane wrote:
>> I don't immediately see a solution that's better than dropping the
>> single-argument range constructors.

> We could change the name, I suppose, but that seems awkward.

Yeah, something like int4range_1(42) would work, but it seems rather
ugly.

> I'm hesitant to remove them because the alternative is significantly
> more verbose:
>   numrange(1.0, 1.0, '[]');

Right.  The question is, does the case occur in practice often enough
to justify a shorter notation?  I'm not sure.

One thing I've been thinking for a bit is that for discrete ranges,
I find the '[)' canonical form to be surprising/confusing.  If we
were to fix range_adjacent along the lines suggested by Florian,
would it be practical to go over to '[]' as the canonical form?
One good thing about that approach is that canonicalization wouldn't
have to involve generating values that might overflow.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Pavel Stehule
Дата:
От: Tom Lane
Дата:
FAQ