aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2001-02-28 20:39:42 +0000
committerPeter Eisentraut <peter_e@gmx.net>2001-02-28 20:39:42 +0000
commitbd6f02e7e6d54527bedd0e2cfb21504aef7b8570 (patch)
tree5e56b0e1fa560d84059a72bc9e87a485e31b770e
parente96358a60a0f77cda032074d2039598c40c814de (diff)
downloadpostgresql-bd6f02e7e6d54527bedd0e2cfb21504aef7b8570.tar.gz
postgresql-bd6f02e7e6d54527bedd0e2cfb21504aef7b8570.zip
Do not strip whitespace within quotes.
-rw-r--r--src/bin/psql/mainloop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index 4049a4d185d..0f29027fd4a 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.35 2001/02/10 02:31:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.36 2001/02/28 20:39:42 petere Exp $
*/
#include "postgres_fe.h"
#include "mainloop.h"
@@ -249,7 +249,7 @@ MainLoop(FILE *source)
pset.lineno++;
/* nothing left on line? then ignore */
- if (line[0] == '\0')
+ if (line[0] == '\0' && !in_quote)
{
free(line);
continue;
@@ -510,7 +510,7 @@ MainLoop(FILE *source)
/* Put the rest of the line in the query buffer. */
- if (line[query_start + strspn(line + query_start, " \t\n\r")] != '\0')
+ if (in_quote || line[query_start + strspn(line + query_start, " \t\n\r")] != '\0')
{
if (query_buf->len > 0)
appendPQExpBufferChar(query_buf, '\n');