Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7046d30

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 likeuncontroversial bug fixes for v11 features, so back-patch them into v11.Justin PryzbyDiscussion:https://postgr.es/m/20180529000623.GA21896@telsasoft.com
1 parentb7f6bcb commit7046d30

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
@@ -558,6 +558,7 @@ static const SchemaQuery Query_for_list_of_tmf = {
558558
.catname="pg_catalog.pg_class c",
559559
.selcondition=
560560
"c.relkind IN ("CppAsString2(RELKIND_RELATION)", "
561+
CppAsString2(RELKIND_PARTITIONED_TABLE)", "
561562
CppAsString2(RELKIND_MATVIEW)", "
562563
CppAsString2(RELKIND_FOREIGN_TABLE)")",
563564
.viscondition="pg_catalog.pg_table_is_visible(c.oid)",
@@ -2026,6 +2027,7 @@ psql_completion(const char *text, int start, int end)
20262027
"fillfactor",
20272028
"parallel_workers",
20282029
"log_autovacuum_min_duration",
2030+
"toast_tuple_target",
20292031
"toast.autovacuum_enabled",
20302032
"toast.autovacuum_freeze_max_age",
20312033
"toast.autovacuum_freeze_min_age",
@@ -2507,7 +2509,7 @@ psql_completion(const char *text, int start, int end)
25072509
COMPLETE_WITH_LIST2("TABLE","MATERIALIZED VIEW");
25082510
/* Complete PARTITION BY with RANGE ( or LIST ( or ... */
25092511
elseif (TailMatches2("PARTITION","BY"))
2510-
COMPLETE_WITH_LIST2("RANGE (","LIST (");
2512+
COMPLETE_WITH_LIST3("RANGE (","LIST (","HASH (");
25112513
/* If we have xxx PARTITION OF, provide a list of partitioned tables */
25122514
elseif (TailMatches2("PARTITION","OF"))
25132515
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_partitioned_tables,"");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp