mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
elog(NOTICE) during COPY incorrectly reset lineno to 0, causing any
subsequent elogs() in the same COPY operation to display the wrong line number. Fix is to clear lineno only when elog level is such that we will not return to caller.
This commit is contained in:
parent
ffc9812451
commit
4ca7d148cb
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.56 2000/04/12 17:15:55 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.57 2000/04/15 19:13:08 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -197,8 +197,9 @@ elog(int lev, const char *fmt,...)
|
|||||||
if (lineno)
|
if (lineno)
|
||||||
{
|
{
|
||||||
sprintf(bp, "copy: line %d, ", lineno);
|
sprintf(bp, "copy: line %d, ", lineno);
|
||||||
bp = fmt_buf + strlen(fmt_buf);
|
bp += strlen(bp);
|
||||||
lineno = 0;
|
if (lev == ERROR || lev >= FATAL)
|
||||||
|
lineno = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cp = fmt; *cp; cp++)
|
for (cp = fmt; *cp; cp++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user