]> granicus.if.org Git - postgresql/blobdiff - src/bin/psql/mainloop.c
Included all yacc and lex files into the distribution.
[postgresql] / src / bin / psql / mainloop.c
index 6380b674fdc91fbdea8288348b6a8ab48f94ce64..29db0d06108147bee8715a280f167c9966256d2d 100644 (file)
@@ -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,