On Jun27, 2011, at 03:12 , Jeff Davis wrote: > But I think you're right, it shouldn't be the responsibility of range > types. Perhaps I should leave length() as some inlinable SQL functions > like I mentioned, or perhaps I should remove them completely.
Does the current definition of length(range), i.e. upper(range) - lower(range) deal correctly with open vs. closed ranges and unbounded ranges? I'm thinking that it probably doesn't - what would be the results of length('[0,1]'::intrange) -- Should be 2 length('[0,1)'::intrange) -- Should be 1 length('[0,inf]'::intrange) -- Should be infinity, but ints can't represent that, can't they? If it cannot be easily made to support these cases, than I vote for removing it all together. 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