@@ -877,6 +877,7 @@ typedef struct
877
877
#define THING_NO_SHOW (THING_NO_CREATE | THING_NO_DROP)
878
878
879
879
static const pgsql_thing_t words_after_create []= {
880
+ {"ACCESS METHOD" ,NULL ,NULL },
880
881
{"AGGREGATE" ,NULL ,& Query_for_list_of_aggregates },
881
882
{"CAST" ,NULL ,NULL },/* Casts have complex structures for names, so
882
883
* skip it */
@@ -1977,6 +1978,17 @@ psql_completion(const char *text, int start, int end)
1977
1978
COMPLETE_WITH_LIST5 ("HEADER" ,"QUOTE" ,"ESCAPE" ,"FORCE QUOTE" ,
1978
1979
"FORCE NOT NULL" );
1979
1980
1981
+ /* CREATE ACCESS METHOD */
1982
+ /* Complete "CREATE ACCESS METHOD <name>" */
1983
+ else if (Matches4 ("CREATE" ,"ACCESS" ,"METHOD" ,MatchAny ))
1984
+ COMPLETE_WITH_CONST ("TYPE" );
1985
+ /* Complete "CREATE ACCESS METHOD <name> TYPE" */
1986
+ else if (Matches5 ("CREATE" ,"ACCESS" ,"METHOD" ,MatchAny ,"TYPE" ))
1987
+ COMPLETE_WITH_CONST ("INDEX" );
1988
+ /* Complete "CREATE ACCESS METHOD <name> TYPE <type>" */
1989
+ else if (Matches6 ("CREATE" ,"ACCESS" ,"METHOD" ,MatchAny ,"TYPE" ,MatchAny ))
1990
+ COMPLETE_WITH_CONST ("HANDLER" );
1991
+
1980
1992
/* CREATE DATABASE */
1981
1993
else if (Matches3 ("CREATE" ,"DATABASE" ,MatchAny ))
1982
1994
COMPLETE_WITH_LIST9 ("OWNER" ,"TEMPLATE" ,"ENCODING" ,"TABLESPACE" ,
@@ -2263,6 +2275,7 @@ psql_completion(const char *text, int start, int end)
2263
2275
else if (Matches3 ("DROP" ,
2264
2276
"COLLATION|CONVERSION|DOMAIN|EXTENSION|LANGUAGE|SCHEMA|SEQUENCE|SERVER|TABLE|TYPE|VIEW" ,
2265
2277
MatchAny )||
2278
+ Matches4 ("DROP" ,"ACCESS" ,"METHOD" ,MatchAny )||
2266
2279
(Matches4 ("DROP" ,"AGGREGATE|FUNCTION" ,MatchAny ,MatchAny )&&
2267
2280
ends_with (prev_wd ,')' ))||
2268
2281
Matches4 ("DROP" ,"EVENT" ,"TRIGGER" ,MatchAny )||