On Wed, 2011-09-21 at 17:20 +0200, Florian Pflug wrote: > Hm, so we'd have > > '(X,)' for range(X, NULL, '()'), > '(,X)' for range(NULL, X, '()') and > '(,)' for range(NULL, NULL, '()'). > > We'd then have the choice of either declaring > > '(X,]' to mean '(X,)', > '[,X)' to mean '(,X)' and > '[,]' to mean '(,)' > > or to forbid the use of '[' and ']' for unspecified bounds.
Right now, I just canonicalize it to round brackets if infinite. Seems pointless to reject it, but I can if someone thinks it's better. > (Leaving out the ',' in the case of only one bound as in my reply to Robert's > mail somewhere else in this thread doesn't actually work, since it'd be > ambiguous whether '(X)' means range(X, NULL, '()') or range(NULL, X, '()').) > > One nice property is that, apart from the different brackets used, this > representation is identical to the one used by records while still avoiding > the infinity vs. NULL confusion. OK, I like that. Slightly strange to require quoting empty strings, but not stranger than the alternatives. While we're at it, any suggestions on the text representation of an empty range? Regards, Jeff Davis -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers