diff options
Diffstat (limited to 'src/bin/psql/mainloop.c')
-rw-r--r-- | src/bin/psql/mainloop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index 6380b674fdc..29db0d06108 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -268,8 +268,9 @@ MainLoop(FILE *source, int encoding) /* colon -> substitute variable */ /* we need to be on the watch for the '::' operator */ - else if (line[i] == ':' && !was_bslash && - strspn(line+i+thislen, VALID_VARIABLE_CHARS)>0 + else if (line[i] == ':' && !was_bslash + && strspn(line+i+thislen, VALID_VARIABLE_CHARS)>0 + && !(prevlen>0 && line[i-prevlen] == ':') ) { size_t in_length, |