git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ea92368) | patch
Allow extensions to generate lossy index conditions.
2019年2月12日 02:26:08 +0000 (21:26 -0500)
2019年2月12日 02:26:14 +0000 (21:26 -0500)
commit 74dfe58a5927b22c744b29534e67bfdd203ac028
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
20 files changed:
doc/src/sgml/xfunc.sgml diff | blob | blame | history
src/backend/optimizer/path/indxpath.c diff | blob | blame | history
src/backend/optimizer/util/clauses.c diff | blob | blame | history
src/backend/utils/adt/Makefile diff | blob | blame | history
src/backend/utils/adt/like_support.c [new file with mode: 0644] blob
src/backend/utils/adt/network.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/include/nodes/nodes.h diff | blob | blame | history
src/include/nodes/pathnodes.h diff | blob | blame | history
src/include/nodes/supportnodes.h diff | blob | blame | history
src/include/optimizer/optimizer.h diff | blob | blame | history
src/test/regress/expected/btree_index.out diff | blob | blame | history
src/test/regress/expected/create_index.out diff | blob | blame | history
src/test/regress/expected/inet.out diff | blob | blame | history
src/test/regress/expected/rowtypes.out diff | blob | blame | history
src/test/regress/sql/btree_index.sql diff | blob | blame | history
src/test/regress/sql/create_index.sql diff | blob | blame | history
src/test/regress/sql/inet.sql diff | blob | blame | history
src/test/regress/sql/rowtypes.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /