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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: e2b37d9) | patch
Invent "amadjustmembers" AM method for validating opclass members.
Sat, 1 Aug 2020 21:12:47 +0000 (17:12 -0400)
Sat, 1 Aug 2020 21:12:47 +0000 (17:12 -0400)
commit 9f9682783bea74bf8d93cac4f7dd65fa677f5dc7
Invent "amadjustmembers" AM method for validating opclass members.

This allows AM-specific knowledge to be applied during creation of
pg_amop and pg_amproc entries. Specifically, the AM knows better than
core code which entries to consider as required or optional. Giving
the latter entries the appropriate sort of dependency allows them to
be dropped without taking out the whole opclass or opfamily; which
is something we'd like to have to correct obsolescent entries in
extensions.

This callback also opens the door to performing AM-specific validity
checks during opclass creation, rather than hoping than an opclass
developer will remember to test with "amvalidate". For the most part
I've not actually added any such checks yet; that can happen in a
follow-on patch. (Note that we shouldn't remove any tests from
"amvalidate", as those are still needed to cross-check manually
constructed entries in the initdb data. So adding tests to
"amadjustmembers" will be somewhat duplicative, but it seems like
a good idea anyway.)

Patch by me, reviewed by Alexander Korotkov, Hamid Akhtar, and
Anastasia Lubennikova.

Discussion: https://postgr.es/m/4578.1565195302@sss.pgh.pa.us
24 files changed:
contrib/bloom/blutils.c diff | blob | blame | history
doc/src/sgml/indexam.sgml diff | blob | blame | history
src/backend/access/brin/brin.c diff | blob | blame | history
src/backend/access/gin/ginutil.c diff | blob | blame | history
src/backend/access/gin/ginvalidate.c diff | blob | blame | history
src/backend/access/gist/gist.c diff | blob | blame | history
src/backend/access/gist/gistvalidate.c diff | blob | blame | history
src/backend/access/hash/hash.c diff | blob | blame | history
src/backend/access/hash/hashvalidate.c diff | blob | blame | history
src/backend/access/index/amvalidate.c diff | blob | blame | history
src/backend/access/nbtree/nbtree.c diff | blob | blame | history
src/backend/access/nbtree/nbtvalidate.c diff | blob | blame | history
src/backend/access/spgist/spgutils.c diff | blob | blame | history
src/backend/access/spgist/spgvalidate.c diff | blob | blame | history
src/backend/commands/opclasscmds.c diff | blob | blame | history
src/bin/pg_dump/t/002_pg_dump.pl diff | blob | blame | history
src/include/access/amapi.h diff | blob | blame | history
src/include/access/amvalidate.h diff | blob | blame | history
src/include/access/gin_private.h diff | blob | blame | history
src/include/access/gist_private.h diff | blob | blame | history
src/include/access/hash.h diff | blob | blame | history
src/include/access/nbtree.h diff | blob | blame | history
src/include/access/spgist.h diff | blob | blame | history
src/include/catalog/opfam_internal.h [deleted file] blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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