Re: Range Types - typo + NULL string constructor

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Range Types - typo + NULL string constructor
Дата
Msg-id 01755379-7AFC-4B2F-ABF2-5F5F8414A80D@phlo.org
обсуждение исходный текст
Ответ на Re: Range Types - typo + NULL string constructor  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Range Types - typo + NULL string constructor
Список pgsql-hackers
On Oct10, 2011, at 18:53 , Tom Lane wrote:
> What if I write '[1,INT_MAX]'::int4range?  The open-parenthesis form will
> fail with an integer overflow.  I suppose you could canonicalize it to
> an unbounded range, but that seems unnecessarily surprising.

That is a very good point. Canonicalizing to an unbounded range doesn't work,
because, as it stands, the ranges '[1, INT_MAX]' and '[1,)' are *not* equal. So
the only remaining option is to canonicalize to the closed form always.

I still think we should strive for consistency here, so let's also make
'[]' the default flags for the range constructors.

best regards,
Florian Pflug



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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: SET variable - Permission issues
Следующее
От: Bruce Momjian
Дата:
Сообщение: COUNT(*) and index-only scans