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

Commita3d40e9

Browse files
committed
Add tab completion for psql \dg and \z
Josh Kupershmidt
1 parent299591d commita3d40e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,15 +2553,17 @@ psql_completion(char *text, int start, int end)
25532553
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_indexes,NULL);
25542554
elseif (strncmp(prev_wd,"\\dn",strlen("\\dn"))==0)
25552555
COMPLETE_WITH_QUERY(Query_for_list_of_schemas);
2556-
elseif (strncmp(prev_wd,"\\dp",strlen("\\dp"))==0)
2556+
elseif (strncmp(prev_wd,"\\dp",strlen("\\dp"))==0
2557+
||strncmp(prev_wd,"\\z",strlen("\\z"))==0)
25572558
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tsv,NULL);
25582559
elseif (strncmp(prev_wd,"\\ds",strlen("\\ds"))==0)
25592560
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_sequences,NULL);
25602561
elseif (strncmp(prev_wd,"\\dt",strlen("\\dt"))==0)
25612562
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables,NULL);
25622563
elseif (strncmp(prev_wd,"\\dT",strlen("\\dT"))==0)
25632564
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_datatypes,NULL);
2564-
elseif (strncmp(prev_wd,"\\du",strlen("\\du"))==0)
2565+
elseif (strncmp(prev_wd,"\\du",strlen("\\du"))==0
2566+
|| (strncmp(prev_wd,"\\dg",strlen("\\dg"))==0))
25652567
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
25662568
elseif (strncmp(prev_wd,"\\dv",strlen("\\dv"))==0)
25672569
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views,NULL);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp