Fix case sensitivity in psql's tab completion for GUC names.
Input for these should be case-insensitive, but was not completely so. Comparing to the similar queries for timezone names, I realized that we'd missed forcing the comparison pattern to lower-case. With that, it behaves as I expect. While here, flatten the sub-selects in these queries; I don't find that those add any readability. Discussion: https://postgr.es/m/3369130.1649348542@sss.pgh.pa.us
This commit is contained in:
parent
139d46ee26
commit
b5607b0746
@ -1006,24 +1006,18 @@ static const SchemaQuery Query_for_trigger_of_table = {
|
||||
|
||||
/* Use COMPLETE_WITH_QUERY_VERBATIM with these queries for GUC names: */
|
||||
#define Query_for_list_of_alter_system_set_vars \
|
||||
"SELECT name FROM "\
|
||||
" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\
|
||||
" WHERE context != 'internal' "\
|
||||
" ) ss "\
|
||||
" WHERE name LIKE '%s'"
|
||||
"SELECT pg_catalog.lower(name) FROM pg_catalog.pg_settings "\
|
||||
" WHERE context != 'internal' "\
|
||||
" AND pg_catalog.lower(name) LIKE pg_catalog.lower('%s')"
|
||||
|
||||
#define Query_for_list_of_set_vars \
|
||||
"SELECT name FROM "\
|
||||
" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\
|
||||
" WHERE context IN ('user', 'superuser') "\
|
||||
" ) ss "\
|
||||
" WHERE name LIKE '%s'"
|
||||
"SELECT pg_catalog.lower(name) FROM pg_catalog.pg_settings "\
|
||||
" WHERE context IN ('user', 'superuser') "\
|
||||
" AND pg_catalog.lower(name) LIKE pg_catalog.lower('%s')"
|
||||
|
||||
#define Query_for_list_of_show_vars \
|
||||
"SELECT name FROM "\
|
||||
" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\
|
||||
" ) ss "\
|
||||
" WHERE name LIKE '%s'"
|
||||
"SELECT pg_catalog.lower(name) FROM pg_catalog.pg_settings "\
|
||||
" WHERE pg_catalog.lower(name) LIKE pg_catalog.lower('%s')"
|
||||
|
||||
#define Query_for_list_of_roles \
|
||||
" SELECT rolname "\
|
||||
|
Loading…
x
Reference in New Issue
Block a user