Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd6f02e

Browse files
committed
Do not strip whitespace within quotes.
1 parente96358a commitbd6f02e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/psql/mainloop.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
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 $
77
*/
88
#include"postgres_fe.h"
99
#include"mainloop.h"
@@ -249,7 +249,7 @@ MainLoop(FILE *source)
249249
pset.lineno++;
250250

251251
/* nothing left on line? then ignore */
252-
if (line[0]=='\0')
252+
if (line[0]=='\0'&& !in_quote)
253253
{
254254
free(line);
255255
continue;
@@ -510,7 +510,7 @@ MainLoop(FILE *source)
510510

511511

512512
/* 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')
514514
{
515515
if (query_buf->len>0)
516516
appendPQExpBufferChar(query_buf,'\n');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp