|
3 | 3 | *
|
4 | 4 | * Copyright 2000 by PostgreSQL Global Development Group
|
5 | 5 | *
|
6 |
| - * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.35 2001/02/10 02:31:28 tgl Exp $ |
| 6 | + * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.36 2001/02/28 20:39:42 petere Exp $ |
7 | 7 | */
|
8 | 8 | #include"postgres_fe.h"
|
9 | 9 | #include"mainloop.h"
|
@@ -249,7 +249,7 @@ MainLoop(FILE *source)
|
249 | 249 | pset.lineno++;
|
250 | 250 |
|
251 | 251 | /* nothing left on line? then ignore */
|
252 |
| -if (line[0]=='\0') |
| 252 | +if (line[0]=='\0'&& !in_quote) |
253 | 253 | {
|
254 | 254 | free(line);
|
255 | 255 | continue;
|
@@ -510,7 +510,7 @@ MainLoop(FILE *source)
|
510 | 510 |
|
511 | 511 |
|
512 | 512 | /* Put the rest of the line in the query buffer. */
|
513 |
| -if (line[query_start+strspn(line+query_start," \t\n\r")]!='\0') |
| 513 | +if (in_quote||line[query_start+strspn(line+query_start," \t\n\r")]!='\0') |
514 | 514 | {
|
515 | 515 | if (query_buf->len>0)
|
516 | 516 | appendPQExpBufferChar(query_buf,'\n');
|
|