postgresql/src/include/optimizer
Tom Lane 74dfe58a59 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 available
to extensions.  This commit finally accomplishes that, by adding another
API for planner support functions that lets them create derived index
conditions for their functions.  As proof of concept, the hardwired
"special index operator" code formerly present in indxpath.c is pushed
out to planner support functions attached to LIKE and other relevant
operators.

A weak spot in this design is that an extension needs to know OIDs for
the operators, datatypes, and opfamilies involved in the transformation
it wants to make.  The core-code prototypes use hard-wired OID references
but extensions don't have that option for their own operators etc.  It's
usually possible to look up the required info, but that may be slow and
inconvenient.  However, improving that situation is a separate task.

I want to do some additional refactorization around selfuncs.c, but
that also seems like a separate task.

Discussion: https://postgr.es/m/15193.1548028093@sss.pgh.pa.us
2019-02-11 21:26:14 -05:00
..
appendinfo.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
clauses.h Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
cost.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
geqo.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
geqo_copy.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geqo_gene.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geqo_misc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geqo_mutation.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geqo_pool.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geqo_random.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geqo_recombination.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
geqo_selection.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
inherit.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
joininfo.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
optimizer.h Allow extensions to generate lossy index conditions. 2019-02-11 21:26:14 -05:00
orclauses.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
paramassign.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
pathnode.h Refactor the representation of indexable clauses in IndexPaths. 2019-02-09 17:30:43 -05:00
paths.h Refactor the representation of indexable clauses in IndexPaths. 2019-02-09 17:30:43 -05:00
placeholder.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
plancat.h Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
planmain.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
planner.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
prep.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
restrictinfo.h Refactor the representation of indexable clauses in IndexPaths. 2019-02-09 17:30:43 -05:00
subselect.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
tlist.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00