Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65b2ee2

Browse files
committed
Prevent psql tab completion in SET from adding TO when the equals sign
has no space before it. Report by Erik Rijkers
1 parent 5ea6c9d commit 65b2ee2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/psql/tab-complete.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2842,6 +2842,7 @@ psql_completion(char *text, int start, int end)
28422842
pg_strcasecmp(prev_wd, "TABLESPACE") != 0 &&
28432843
pg_strcasecmp(prev_wd, "SCHEMA") != 0 &&
28442844
prev_wd[strlen(prev_wd) - 1] != ')' &&
2845+
prev_wd[strlen(prev_wd) - 1] != '=' &&
28452846
pg_strcasecmp(prev4_wd, "DOMAIN") != 0)
28462847
COMPLETE_WITH_CONST("TO");
28472848
/* Suggest possible variable values */

0 commit comments

Comments
 (0)