aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1997-01-02 06:45:25 +0000
committerBruce Momjian <bruce@momjian.us>1997-01-02 06:45:25 +0000
commit6e2341a48e7e9cf226069d8ac55b51217035628c (patch)
treed52885f4f4a282872d2fd58c6816025745b68ddc /src
parent1a395b7256442023ee600f9510d007dbeb0056fa (diff)
downloadpostgresql-6e2341a48e7e9cf226069d8ac55b51217035628c.tar.gz
postgresql-6e2341a48e7e9cf226069d8ac55b51217035628c.zip
psql paren. with \r fix.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/psql.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index a32d2c69ee5..1e3c1a7fb23 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.43 1996/12/28 02:12:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.44 1997/01/02 06:45:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1263,6 +1263,7 @@ MainLoop(PsqlSettings * settings, FILE * source)
/* main loop for getting queries and executing them */
while (!eof) {
if (slashCmdStatus == 3) {
+ paren_level = 0;
line = strdup(query);
query[0] = '\0';
} else {
@@ -1376,8 +1377,12 @@ MainLoop(PsqlSettings * settings, FILE * source)
query_start,
query);
if (slashCmdStatus == 1) {
- free(line);
- continue;
+ if (query[0] == '\0')
+ {
+ paren_level = 0;
+ free(line);
+ continue;
+ }
}
if (slashCmdStatus == 2) {
free(line);