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

Commit71a4368

Browse files
committed
Fix psql's counting of script file line numbers during COPY.
handleCopyIn incremented pset.lineno for each line of COPY data read froma file. This is correct when reading from the current script file (i.e.,we are doing COPY FROM STDIN followed by in-line data), but it's wrong ifthe data is coming from some other file. Per bug #6083 from Steve Haslam.Back-patch to all supported versions.
1 parent41fd969 commit71a4368

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/psql/copy.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,8 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary)
841841
}
842842
}
843843

844-
pset.lineno++;
844+
if (copystream==pset.cur_cmd_source)
845+
pset.lineno++;
845846
}
846847
}
847848

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp