From 65b2ee27ad926f622f06c3a4029b621e8d72fb67 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 28 Aug 2012 12:53:31 -0400 Subject: [PATCH] Prevent psql tab completion in SET from adding TO when the equals sign has no space before it. Report by Erik Rijkers --- src/bin/psql/tab-complete.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 8a74877198..bfba1ddd93 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2842,6 +2842,7 @@ psql_completion(char *text, int start, int end) pg_strcasecmp(prev_wd, "TABLESPACE") != 0 && pg_strcasecmp(prev_wd, "SCHEMA") != 0 && prev_wd[strlen(prev_wd) - 1] != ')' && + prev_wd[strlen(prev_wd) - 1] != '=' && pg_strcasecmp(prev4_wd, "DOMAIN") != 0) COMPLETE_WITH_CONST("TO"); /* Suggest possible variable values */