From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add planner support functions for range operators <@ and @>. |
Date: | 2024-01-20 18:58:02 |
Message-ID: | E1rRGXa-002KnM-1p@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add planner support functions for range operators <@ and @>.
These support functions will transform expressions with constant
range values into direct comparisons on the range bound values,
which are frequently better-optimizable. The transformation is
skipped however if it would require double evaluation of a
volatile or expensive element expression.
Along the way, add the range opfamily OID to range typcache entries,
since load_rangetype_info has to compute that anyway and it seems
silly to duplicate the work later.
Kim Johan Andersson and Jian He, reviewed by Laurenz Albe
Discussion: https://postgr.es/m/94f64d1f-b8c0-b0c5-98bc-0793a34e0851@kimmet.dk
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/075df6b2080b13e0a5adc88737b7c24417a873c1
Modified Files
--------------
src/backend/utils/adt/rangetypes.c | 244 +++++++++++++++++++++++++++-
src/backend/utils/adt/rangetypes_selfuncs.c | 7 +-
src/backend/utils/cache/typcache.c | 1 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 14 +-
src/include/utils/typcache.h | 1 +
src/test/regress/expected/rangetypes.out | 142 ++++++++++++++++
src/test/regress/sql/rangetypes.sql | 69 ++++++++
8 files changed, 469 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-01-20 22:54:20 | pgsql: Add hint about not qualifying UPDATE...SET target with relation |
Previous Message | Nathan Bossart | 2024-01-19 20:44:38 | pgsql: Teach autoprewarm to use the dynamic shared memory registry. |