aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-09-12 15:24:56 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-09-12 15:25:14 -0400
commit12368f5e83e70e015a7352f52115579c135e82e5 (patch)
tree0e0a167bbc8b96e1bbcf70a1e759927449cc38a2 /src
parentf7d0343ead29cd3e44eccd1c8b7cc291b79209fe (diff)
downloadpostgresql-12368f5e83e70e015a7352f52115579c135e82e5.tar.gz
postgresql-12368f5e83e70e015a7352f52115579c135e82e5.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index bb696f8ee90..d5f0130f442 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -705,6 +705,7 @@ static const SchemaQuery Query_for_list_of_tmf = {
"pg_catalog.pg_class c",
/* selcondition */
"c.relkind IN (" CppAsString2(RELKIND_RELATION) ", "
+ CppAsString2(RELKIND_PARTITIONED_TABLE) ", "
CppAsString2(RELKIND_MATVIEW) ", "
CppAsString2(RELKIND_FOREIGN_TABLE) ")",
/* viscondition */
@@ -2222,6 +2223,7 @@ psql_completion(const char *text, int start, int end)
"fillfactor",
"parallel_workers",
"log_autovacuum_min_duration",
+ "toast_tuple_target",
"toast.autovacuum_enabled",
"toast.autovacuum_freeze_max_age",
"toast.autovacuum_freeze_min_age",
@@ -2703,7 +2705,7 @@ psql_completion(const char *text, int start, int end)
COMPLETE_WITH_LIST2("TABLE", "MATERIALIZED VIEW");
/* Complete PARTITION BY with RANGE ( or LIST ( or ... */
else if (TailMatches2("PARTITION", "BY"))
- COMPLETE_WITH_LIST2("RANGE (", "LIST (");
+ COMPLETE_WITH_LIST3("RANGE (", "LIST (", "HASH (");
/* If we have xxx PARTITION OF, provide a list of partitioned tables */
else if (TailMatches2("PARTITION", "OF"))
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_partitioned_tables, "");