"Joel Jacobson" <j...@compiler.org> writes: > As discussed in the separate thread "[PATCH] regexp_positions ( string text, > pattern text, flags text ) → setof int4range[]" [1] > it's currently not possible to create an empty range with bounds information.
> This patch tries to improve the situation by keeping the bounds information, > and allow accessing it via lower() and upper(). I think this is an actively bad idea. We had a clean set-theoretic definition of ranges as sets of points, and with this we would not. We should not be whacking around the fundamental semantics of a whole class of data types on the basis that it'd be cute to make regexp_position return its result as int4range rather than int[]. If we did go forward with this, what would the implications be for multiranges? regards, tom lane