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

Commitbd40951

Browse files
committed
Minimal psql tab completion support for SET search_path.
Complete SET search_path = ... to non-temporary and non-toastschemas. Since there pretty much is no use case to add those to thesearch path and there can be many it's helpful to exclude them.It'd be nicer to complete multiple search path elements, but that'snot easy.Jeff Janes
1 parent626bfad commitbd40951

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3352,6 +3352,13 @@ psql_completion(const char *text, int start, int end)
33523352

33533353
COMPLETE_WITH_LIST(my_list);
33543354
}
3355+
elseif (pg_strcasecmp(prev2_wd,"search_path")==0)
3356+
{
3357+
COMPLETE_WITH_QUERY(Query_for_list_of_schemas
3358+
" AND nspname not like 'pg\\_toast%%' "
3359+
" AND nspname not like 'pg\\_temp%%' "
3360+
" UNION SELECT 'DEFAULT' ");
3361+
}
33553362
else
33563363
{
33573364
staticconstchar*constmy_list[]=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp