Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 12368f5

Browse files
committed
Minor fixes for psql tab completion.
* Include partitioned tables in what's offered after ANALYZE. * Include toast_tuple_target in what's offered after ALTER TABLE ... SET|RESET. * Include HASH in what's offered after PARTITION BY. This is extracted from a larger patch; these bits seem like uncontroversial bug fixes for v11 features, so back-patch them into v11. Justin Pryzby Discussion: https://postgr.es/m/20180529000623.GA21896@telsasoft.com
1 parent f7d0343 commit 12368f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bin/psql/tab-complete.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ static const SchemaQuery Query_for_list_of_tmf = {
705705
"pg_catalog.pg_class c",
706706
/* selcondition */
707707
"c.relkind IN (" CppAsString2(RELKIND_RELATION) ", "
708+
CppAsString2(RELKIND_PARTITIONED_TABLE) ", "
708709
CppAsString2(RELKIND_MATVIEW) ", "
709710
CppAsString2(RELKIND_FOREIGN_TABLE) ")",
710711
/* viscondition */
@@ -2222,6 +2223,7 @@ psql_completion(const char *text, int start, int end)
22222223
"fillfactor",
22232224
"parallel_workers",
22242225
"log_autovacuum_min_duration",
2226+
"toast_tuple_target",
22252227
"toast.autovacuum_enabled",
22262228
"toast.autovacuum_freeze_max_age",
22272229
"toast.autovacuum_freeze_min_age",
@@ -2703,7 +2705,7 @@ psql_completion(const char *text, int start, int end)
27032705
COMPLETE_WITH_LIST2("TABLE", "MATERIALIZED VIEW");
27042706
/* Complete PARTITION BY with RANGE ( or LIST ( or ... */
27052707
else if (TailMatches2("PARTITION", "BY"))
2706-
COMPLETE_WITH_LIST2("RANGE (", "LIST (");
2708+
COMPLETE_WITH_LIST3("RANGE (", "LIST (", "HASH (");
27072709
/* If we have xxx PARTITION OF, provide a list of partitioned tables */
27082710
else if (TailMatches2("PARTITION", "OF"))
27092711
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_partitioned_tables, "");

0 commit comments

Comments
 (0)