diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-06-07 17:59:34 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-06-07 17:59:34 -0400 |
commit | 4f04b66f97f0e0265489f0fe0373ea44c9ad11bf (patch) | |
tree | ca0082bb0011ef27c5f483f5088e2eadadaea4a6 /src/backend/parser | |
parent | 77ba610805e7ef9ba9c9a593ea8b1ca8f98f8bcb (diff) | |
download | postgresql-4f04b66f97f0e0265489f0fe0373ea44c9ad11bf.tar.gz postgresql-4f04b66f97f0e0265489f0fe0373ea44c9ad11bf.zip |
Fix loose ends for SQL ACCESS METHOD objects
COMMENT ON ACCESS METHOD was missing; add it, along psql tab-completion
support for it.
psql was also missing a way to list existing access methods; the new \dA
command does that.
Also add tab-completion support for DROP ACCESS METHOD.
Author: Michael Paquier
Discussion: https://www.postgresql.org/message-id/CAB7nPqTzdZdu8J7EF8SXr_R2U5bSUUYNOT3oAWBZdEoggnwhGA@mail.gmail.com
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/gram.y | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index ad338d3ddbe..2c950f937c4 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -5693,7 +5693,8 @@ opt_restart_seqs: * The COMMENT ON statement can take different forms based upon the type of * the object associated with the comment. The form of the statement is: * - * COMMENT ON [ [ CONVERSION | COLLATION | DATABASE | DOMAIN | + * COMMENT ON [ [ ACCESS METHOD | CONVERSION | COLLATION | + * DATABASE | DOMAIN | * EXTENSION | EVENT TRIGGER | FOREIGN DATA WRAPPER | * FOREIGN TABLE | INDEX | [PROCEDURAL] LANGUAGE | * MATERIALIZED VIEW | POLICY | ROLE | SCHEMA | SEQUENCE | @@ -5713,7 +5714,7 @@ opt_restart_seqs: * OPERATOR FAMILY <name> USING <access-method> | * RULE <rulename> ON <relname> | * TRIGGER <triggername> ON <relname> ] - * IS 'text' + * IS { 'text' | NULL } * *****************************************************************************/ @@ -5888,7 +5889,8 @@ CommentStmt: ; comment_type: - COLUMN { $$ = OBJECT_COLUMN; } + ACCESS METHOD { $$ = OBJECT_ACCESS_METHOD; } + | COLUMN { $$ = OBJECT_COLUMN; } | DATABASE { $$ = OBJECT_DATABASE; } | SCHEMA { $$ = OBJECT_SCHEMA; } | INDEX { $$ = OBJECT_INDEX; } |