forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit74dfe58
committed
Allow extensions to generate lossy index conditions.
For a long time, indxpath.c has had the ability to extract derived (lossy)index conditions from certain operators such as LIKE. For just as long,it's been obvious that we really ought to make that capability availableto extensions. This commit finally accomplishes that, by adding anotherAPI for planner support functions that lets them create derived indexconditions for their functions. As proof of concept, the hardwired"special index operator" code formerly present in indxpath.c is pushedout to planner support functions attached to LIKE and other relevantoperators.A weak spot in this design is that an extension needs to know OIDs forthe operators, datatypes, and opfamilies involved in the transformationit wants to make. The core-code prototypes use hard-wired OID referencesbut extensions don't have that option for their own operators etc. It'susually possible to look up the required info, but that may be slow andinconvenient. However, improving that situation is a separate task.I want to do some additional refactorization around selfuncs.c, butthat also seems like a separate task.Discussion:https://postgr.es/m/15193.1548028093@sss.pgh.pa.us1 parentea92368 commit74dfe58
File tree
20 files changed
+1771
-1291
lines changed- doc/src/sgml
- src
- backend
- optimizer
- path
- util
- utils/adt
- include
- catalog
- nodes
- optimizer
- test/regress
- expected
- sql
20 files changed
+1771
-1291
lines changedLines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3460 | 3460 |
| |
3461 | 3461 |
| |
3462 | 3462 |
| |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
3463 | 3477 |
|
0 commit comments
Comments
(0)