Index: src/bin/psql/mainloop.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/psql/mainloop.c,v retrieving revision 1.43 diff -c -r1.43 mainloop.c *** src/bin/psql/mainloop.c 2001/11/05 17:46:31 1.43 --- src/bin/psql/mainloop.c 2001/12/28 04:41:48 *************** *** 447,453 **** { const char *end_of_cmd = NULL; - paren_level = 0; line[i - prevlen] = '\0'; /* overwrites backslash */ /* is there anything else on the line for the command? */ --- 447,452 ---- *************** *** 469,474 **** --- 468,476 ---- &end_of_cmd); success = slashCmdStatus != CMD_ERROR; + + if (query_buf->len == 0) + paren_level = 0; if ((slashCmdStatus == CMD_SEND || slashCmdStatus == CMD_NEWEDIT) && query_buf->len == 0)