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

Commita74a5f5

Browse files
committed
Make TABLE tab complation in psql include all relations
Not just tables, since views also work fine with theTABLE command.
1 parent8140c1b commita74a5f5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,6 +2657,11 @@ psql_completion(char *text, int start, int end)
26572657
elseif (pg_strcasecmp(prev_wd,"START")==0)
26582658
COMPLETE_WITH_CONST("TRANSACTION");
26592659

2660+
/* TABLE, but not TABLE embedded in other commands */
2661+
elseif (pg_strcasecmp(prev_wd,"TABLE")==0&&
2662+
prev2_wd[0]=='\0')
2663+
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_relations,NULL);
2664+
26602665
/* TRUNCATE */
26612666
elseif (pg_strcasecmp(prev_wd,"TRUNCATE")==0)
26622667
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables,NULL);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp