pgsql: Support CREATE ACCESS METHOD - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Support CREATE ACCESS METHOD
Date
Msg-id E1aiucO-0003HB-M4@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Support CREATE ACCESS METHOD

This enables external code to create access methods.  This is useful so
that extensions can add their own access methods which can be formally
tracked for dependencies, so that DROP operates correctly.  Also, having
explicit support makes pg_dump work correctly.

Currently only index AMs are supported, but we expect different types to
be added in the future.

Authors: Alexander Korotkov, Petr Jelínek
Reviewed-By: Teodor Sigaev, Petr Jelínek, Jim Nasby
Commitfest-URL: https://commitfest.postgresql.org/9/353/
Discussion: https://www.postgresql.org/message-id/CAPpHfdsXwZmojm6Dx+TJnpYk27kT4o7Ri6X_4OSWcByu1Rm+VA@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/473b93287040b20017cc25a157cffdc5b978c254

Modified Files
--------------
doc/src/sgml/indexam.sgml                    |   6 +
doc/src/sgml/ref/allfiles.sgml               |   2 +
doc/src/sgml/ref/create_access_method.sgml   | 120 ++++++++++++
doc/src/sgml/ref/drop_access_method.sgml     | 112 +++++++++++
doc/src/sgml/reference.sgml                  |   2 +
src/backend/access/index/amapi.c             |   7 +
src/backend/catalog/dependency.c             |   9 +
src/backend/catalog/objectaddress.c          |  61 +++++-
src/backend/commands/Makefile                |   2 +-
src/backend/commands/amcmds.c                | 271 +++++++++++++++++++++++++++
src/backend/commands/event_trigger.c         |   3 +
src/backend/commands/opclasscmds.c           |  42 +----
src/backend/nodes/copyfuncs.c                |  15 ++
src/backend/nodes/equalfuncs.c               |  13 ++
src/backend/parser/gram.y                    |  25 ++-
src/backend/parser/parse_utilcmd.c           |   2 +-
src/backend/tcop/utility.c                   |  18 ++
src/backend/utils/adt/selfuncs.c             |  46 +----
src/bin/pg_dump/common.c                     |   5 +
src/bin/pg_dump/pg_dump.c                    | 172 +++++++++++++++++
src/bin/pg_dump/pg_dump.h                    |   9 +
src/bin/pg_dump/pg_dump_sort.c               |  11 +-
src/include/catalog/catversion.h             |   2 +-
src/include/catalog/dependency.h             |   1 +
src/include/catalog/pg_am.h                  |  22 ++-
src/include/commands/defrem.h                |   9 +-
src/include/nodes/nodes.h                    |   1 +
src/include/nodes/parsenodes.h               |  13 ++
src/include/parser/kwlist.h                  |   1 +
src/include/utils/selfuncs.h                 |  48 +++++
src/test/regress/expected/create_am.out      | 108 +++++++++++
src/test/regress/expected/object_address.out |  10 +-
src/test/regress/expected/sanity_check.out   |   2 +-
src/test/regress/parallel_schedule           |   2 +-
src/test/regress/serial_schedule             |   1 +
src/test/regress/sql/create_am.sql           |  73 ++++++++
src/test/regress/sql/object_address.sql      |   5 +-
37 files changed, 1150 insertions(+), 101 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Move keywords.c/kwlookup.c into src/common/.
Next
From: Tom Lane
Date:
Subject: pgsql: Avoid PGDLLIMPORT for simple local references in frontend progra