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

Commit4ca7d14

Browse files
committed
elog(NOTICE) during COPY incorrectly reset lineno to 0, causing any
subsequent elogs() in the same COPY operation to display the wrongline number. Fix is to clear lineno only when elog level is suchthat we will not return to caller.
1 parentffc9812 commit4ca7d14

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/backend/utils/error/elog.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.56 2000/04/12 17:15:55 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.57 2000/04/15 19:13:08 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -197,8 +197,9 @@ elog(int lev, const char *fmt,...)
197197
if (lineno)
198198
{
199199
sprintf(bp,"copy: line %d, ",lineno);
200-
bp=fmt_buf+strlen(fmt_buf);
201-
lineno=0;
200+
bp+=strlen(bp);
201+
if (lev==ERROR||lev >=FATAL)
202+
lineno=0;
202203
}
203204

204205
for (cp=fmt;*cp;cp++)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp