On Nov24, 2011, at 04:33 , Tom Lane wrote: > One possibility that just came to me is to decree that every discrete > range type has to be based on an underlying continuous range type (with > all the same properties except no canonicalization function), and then > the discrete range's canonicalization function could be declared to take > and return the underlying range type instead of the discrete type > itself. Haven't worked through the details though.
We could also make the canonicalization function receive the boundaries and boundary types as separate arguments, and return them in the same way. In plpgsql the signature could be canonicalize(inout lower base_type, inout upper base_type, inout lower_inclusive boolean, inout upper_inclusive boolean) Not exactly pretty, but it avoids the need for a second continuous range type... best regards, Florian Pflug -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers