| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Joel Jacobson" <joel(at)compiler(dot)org> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, "Mark Dilger" <mark(dot)dilger(at)enterprisedb(dot)com>, "Isaac Morland" <isaac(dot)morland(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com> |
| Subject: | Re: [PATCH] Support empty ranges with bounds information |
| Date: | 2021-03-02 14:42:36 |
| Message-ID: | 936970.1614696156@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Joel Jacobson" <joel(at)compiler(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Dilger | 2021-03-02 14:49:47 | Re: Add --tablespace option to reindexdb |
| Previous Message | Hamid Akhtar | 2021-03-02 14:33:01 | Re: psql crash while executing core regression tests |