On Tue, Mar 2, 2021, at 06:31, Tom Lane wrote:
>"Joel Jacobson" <j...@compiler.org> writes:
>> Unless fixed, then the way I see it, I don't think we can use int4range[] 
>> for regexp_positions(),
>
>Yeah.  It's a cute idea, but the semantics aren't quite right.

I think there is a case to allow creating empty ranges *with* bounds 
information, e.g. '[6,7)'::int4range,
as well as the current only possibility to create empty ranges *without* bounds 
information, e.g. 'empty'::int4range

I've had a look at how ranges are implemented,
and I think I've found a way to support this is a simple non-invasive way.

I've outlined the idea in a patch, which I will send separately,
as it's a different feature, possibly useful for purposes other than 
regexp_positions().

/Joel

Reply via email to