mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
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
This commit is contained in:
@@ -91,8 +91,6 @@ extern void IsThereOpClassInNamespace(const char *opcname, Oid opcmethod,
|
||||
Oid opcnamespace);
|
||||
extern void IsThereOpFamilyInNamespace(const char *opfname, Oid opfmethod,
|
||||
Oid opfnamespace);
|
||||
extern Oid get_am_oid(const char *amname, bool missing_ok);
|
||||
extern char *get_am_name(Oid amOid);
|
||||
extern Oid get_opclass_oid(Oid amID, List *opclassname, bool missing_ok);
|
||||
extern Oid get_opfamily_oid(Oid amID, List *opfamilyname, bool missing_ok);
|
||||
|
||||
@@ -137,6 +135,13 @@ extern Datum transformGenericOptions(Oid catalogId,
|
||||
List *options,
|
||||
Oid fdwvalidator);
|
||||
|
||||
/* commands/amcmds.c */
|
||||
extern ObjectAddress CreateAccessMethod(CreateAmStmt *stmt);
|
||||
extern void RemoveAccessMethodById(Oid amOid);
|
||||
extern Oid get_index_am_oid(const char *amname, bool missing_ok);
|
||||
extern Oid get_am_oid(const char *amname, bool missing_ok);
|
||||
extern char *get_am_name(Oid amOid);
|
||||
|
||||
/* support routines in commands/define.c */
|
||||
|
||||
extern char *defGetString(DefElem *def);
|
||||
|
||||
Reference in New Issue
Block a user