diff options
| author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-03-23 23:01:35 -0300 |
|---|---|---|
| committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-03-23 23:01:35 -0300 |
| commit | 473b93287040b20017cc25a157cffdc5b978c254 (patch) | |
| tree | 58f662a65247525b2e5e178b9050feb3f3056590 /src/include/nodes | |
| parent | 2c6af4f44228d76d3351fe26f68b00b55cdd239a (diff) | |
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
Diffstat (limited to 'src/include/nodes')
| -rw-r--r-- | src/include/nodes/nodes.h | 1 | ||||
| -rw-r--r-- | src/include/nodes/parsenodes.h | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 42c958258b6..734df771eb2 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -402,6 +402,7 @@ typedef enum NodeTag T_CreatePolicyStmt, T_AlterPolicyStmt, T_CreateTransformStmt, + T_CreateAmStmt, /* * TAGS FOR PARSE TREE NODES (parsenodes.h) diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 2fd06295e5c..8b958b422cb 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1379,6 +1379,7 @@ typedef struct SetOperationStmt typedef enum ObjectType { + OBJECT_ACCESS_METHOD, OBJECT_AGGREGATE, OBJECT_AMOP, OBJECT_AMPROC, @@ -2070,6 +2071,18 @@ typedef struct AlterPolicyStmt Node *with_check; /* the policy's WITH CHECK condition. */ } AlterPolicyStmt; +/*---------------------- + * Create ACCESS METHOD Statement + *---------------------- + */ +typedef struct CreateAmStmt +{ + NodeTag type; + char *amname; /* access method name */ + List *handler_name; /* handler function name */ + char amtype; /* type of access method */ +} CreateAmStmt; + /* ---------------------- * Create TRIGGER Statement * ---------------------- |
