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