Re: [PATCH] Support empty ranges with bounds information

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Joel Jacobson <joel(at)compiler(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Support empty ranges with bounds information
Date: 2021-03-02 20:07:33
Message-ID: 603E9B05.4050903@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/02/21 14:20, Joel Jacobson wrote:
> This would effectively mean there would be absolutely no semantic changes at all.
>
> I will work on a new patch to try out this idea.

I may have been assuming a degree of orthogonality in SQL that isn't
really there ... only in a few situations (like creating an index) do
you easily get to specify a non-default operator class to use when
comparing or hashing a value.

So perhaps a solution could be built on the same range machinery, but
requiring some new syntax in CREATE TYPE ... AS RANGE, something like
WITH POSITIONS. A new concrete range type created that way would not
be a whole different kind of a thing, and would share most machinery
with other range types, but would have the position-remembering
behavior. Given a range type created over int4 in that way, maybe
named int4prange, the regexp_positions function could return one of those.

Regards,
-Chap

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-03-02 20:25:20 Re: Optimising latch signals
Previous Message Joel Jacobson 2021-03-02 20:04:04 Re: [PATCH] Support empty ranges with bounds information