Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 369398e

Browse files
committed
Fix bogus tab-completion queries.
My (tgl's) thinko in commit 02b8048: I forgot that the first argument of COMPLETE_WITH_QUERY_PLUS is a format string, and hence failed to double a literal %. These two places seem to be the only ones that are wrong, though. Vignesh C Discussion: https://postgr.es/m/CALDaNm0hBO+tZqBWhBjTVxyET1GWANq5K9XpQ07atSxnFXbG7w@mail.gmail.com
1 parent 6e20f46 commit 369398e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/tab-complete.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ psql_completion(const char *text, int start, int end)
18111811
COMPLETE_WITH("(", "ALL TABLES IN SCHEMA", "TABLE");
18121812
else if (Matches("ALTER", "PUBLICATION", MatchAny, "ADD|DROP|SET", "ALL", "TABLES", "IN", "SCHEMA"))
18131813
COMPLETE_WITH_QUERY_PLUS(Query_for_list_of_schemas
1814-
" AND nspname NOT LIKE E'pg\\\\_%'",
1814+
" AND nspname NOT LIKE E'pg\\\\_%%'",
18151815
"CURRENT_SCHEMA");
18161816
/* ALTER PUBLICATION <name> SET ( */
18171817
else if (HeadMatches("ALTER", "PUBLICATION", MatchAny) && TailMatches("SET", "("))
@@ -2956,7 +2956,7 @@ psql_completion(const char *text, int start, int end)
29562956
*/
29572957
else if (Matches("CREATE", "PUBLICATION", MatchAny, "FOR", "ALL", "TABLES", "IN", "SCHEMA"))
29582958
COMPLETE_WITH_QUERY_PLUS(Query_for_list_of_schemas
2959-
" AND nspname NOT LIKE E'pg\\\\_%'",
2959+
" AND nspname NOT LIKE E'pg\\\\_%%'",
29602960
"CURRENT_SCHEMA");
29612961
else if (Matches("CREATE", "PUBLICATION", MatchAny, "FOR", "ALL", "TABLES", "IN", "SCHEMA", MatchAny) && (!ends_with(prev_wd, ',')))
29622962
COMPLETE_WITH("WITH (");

0 commit comments

Comments
 (0)