]> granicus.if.org Git - postgresql/commit
Provide CatalogTupleDelete() as a wrapper around simple_heap_delete().
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Feb 2017 21:13:30 +0000 (16:13 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Feb 2017 21:13:30 +0000 (16:13 -0500)
commitab02896510e26e46b830c87eef2c03dd3c52c09e
tree7fa1029a989330f411bae9b018f1350ccefc90ac
parentbbd8550bce146f86e5e883f1232292a975c314fb
Provide CatalogTupleDelete() as a wrapper around simple_heap_delete().

This extends the work done in commit 2f5c9d9c9 to provide a more nearly
complete abstraction layer hiding the details of index updating for catalog
changes.  That commit only invented abstractions for catalog inserts and
updates, leaving nearby code for catalog deletes still calling the
heap-level routines directly.  That seems rather ugly from here, and it
does little to help if we ever want to shift to a storage system in which
indexing work is needed at delete time.

Hence, create a wrapper function CatalogTupleDelete(), and replace calls
of simple_heap_delete() on catalog tuples with it.  There are now very
few direct calls of [simple_]heap_delete remaining in the tree.

Discussion: https://postgr.es/m/462.1485902736@sss.pgh.pa.us
40 files changed:
src/backend/catalog/aclchk.c
src/backend/catalog/dependency.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/indexing.c
src/backend/catalog/pg_collation.c
src/backend/catalog/pg_constraint.c
src/backend/catalog/pg_conversion.c
src/backend/catalog/pg_db_role_setting.c
src/backend/catalog/pg_depend.c
src/backend/catalog/pg_enum.c
src/backend/catalog/pg_largeobject.c
src/backend/catalog/pg_range.c
src/backend/catalog/pg_shdepend.c
src/backend/commands/amcmds.c
src/backend/commands/comment.c
src/backend/commands/dbcommands.c
src/backend/commands/event_trigger.c
src/backend/commands/extension.c
src/backend/commands/foreigncmds.c
src/backend/commands/functioncmds.c
src/backend/commands/opclasscmds.c
src/backend/commands/operatorcmds.c
src/backend/commands/policy.c
src/backend/commands/proclang.c
src/backend/commands/publicationcmds.c
src/backend/commands/schemacmds.c
src/backend/commands/seclabel.c
src/backend/commands/sequence.c
src/backend/commands/subscriptioncmds.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/commands/trigger.c
src/backend/commands/tsearchcmds.c
src/backend/commands/typecmds.c
src/backend/commands/user.c
src/backend/replication/logical/origin.c
src/backend/rewrite/rewriteRemove.c
src/backend/storage/large_object/inv_api.c
src/include/catalog/indexing.h