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

Commitf1af75c

Browse files
committed
Include partitioned tables for tab completion of VACUUM in psql
The relkinds that support indexing are the same as the ones supportingVACUUM, so the code gets refactored a bit with the completion query usedfor CLUSTER, but there is no change for CLUSTER in this commit.Author: Justin PryzbyReviewed-by: Fujii Masao, Michael Paquier, Masahiko SawadaDiscussion:https://postgr.es/m/20200728170408.GI20393@telsasoft.com
1 parent903134f commitf1af75c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

‎src/bin/psql/tab-complete.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ do { \
330330

331331
/*
332332
* Assembly instructions for schema queries
333+
*
334+
* Note that toast tables are not included in those queries to avoid
335+
* unnecessary bloat in the completions generated.
333336
*/
334337

335338
staticconstSchemaQueryQuery_for_list_of_aggregates[]= {
@@ -573,8 +576,14 @@ static const SchemaQuery Query_for_list_of_indexables = {
573576
.result="pg_catalog.quote_ident(c.relname)",
574577
};
575578

576-
/* Relations supporting VACUUM */
577-
staticconstSchemaQueryQuery_for_list_of_vacuumables= {
579+
/*
580+
* Relations supporting VACUUM are currently same as those supporting
581+
* indexing.
582+
*/
583+
#defineQuery_for_list_of_vacuumables Query_for_list_of_indexables
584+
585+
/* Relations supporting CLUSTER */
586+
staticconstSchemaQueryQuery_for_list_of_clusterables= {
578587
.catname="pg_catalog.pg_class c",
579588
.selcondition=
580589
"c.relkind IN ("CppAsString2(RELKIND_RELATION)", "
@@ -584,9 +593,6 @@ static const SchemaQuery Query_for_list_of_vacuumables = {
584593
.result="pg_catalog.quote_ident(c.relname)",
585594
};
586595

587-
/* Relations supporting CLUSTER are currently same as those supporting VACUUM */
588-
#defineQuery_for_list_of_clusterables Query_for_list_of_vacuumables
589-
590596
staticconstSchemaQueryQuery_for_list_of_constraints_with_schema= {
591597
.catname="pg_catalog.pg_constraint c",
592598
.selcondition="c.conrelid <> 0",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp