aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/mainloop.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-12-28 05:00:32 +0000
committerBruce Momjian <bruce@momjian.us>2001-12-28 05:00:32 +0000
commitdeab9274700aad030fe03a246136450491d51afb (patch)
tree1c1ff0d30b6317828084c57a946eaca5c525012c /src/bin/psql/mainloop.c
parentdbaddcfd2b2d1e8c26bd5143acb326a56cffaa27 (diff)
downloadpostgresql-deab9274700aad030fe03a246136450491d51afb.tar.gz
postgresql-deab9274700aad030fe03a246136450491d51afb.zip
Add mention of Christof Petig for ecpg items.
Diffstat (limited to 'src/bin/psql/mainloop.c')
-rw-r--r--src/bin/psql/mainloop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index 4da5bf10cca..b519af9ec4c 100644
--- a/src/bin/psql/mainloop.c
+++ b/src/bin/psql/mainloop.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.43 2001/11/05 17:46:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.44 2001/12/28 05:00:32 momjian Exp $
*/
#include "postgres_fe.h"
#include "mainloop.h"
@@ -447,7 +447,6 @@ MainLoop(FILE *source)
{
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? */
@@ -470,6 +469,9 @@ MainLoop(FILE *source)
success = slashCmdStatus != CMD_ERROR;
+ if (query_buf->len == 0)
+ paren_level = 0;
+
if ((slashCmdStatus == CMD_SEND || slashCmdStatus == CMD_NEWEDIT) &&
query_buf->len == 0)
{