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

Commit3639d08

Browse files
committed
pg_dump: Fix weird error message composition
The previous way could make it look like "stdin" was the actual inputfile name. Write it as two separate messages instead.
1 parent16a3415 commit3639d08

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/bin/pg_dump/filter.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,12 @@ pg_log_filter_error(FilterStateData *fstate, const char *fmt,...)
161161
vsnprintf(buf,sizeof(buf),fmt,argp);
162162
va_end(argp);
163163

164-
pg_log_error("invalid format in filter read from \"%s\" on line %d: %s",
165-
(fstate->fp==stdin ?"stdin" :fstate->filename),
166-
fstate->lineno,
167-
buf);
164+
if (fstate->fp==stdin)
165+
pg_log_error("invalid format in filter read from standard input on line %d: %s",
166+
fstate->lineno,buf);
167+
else
168+
pg_log_error("invalid format in filter read from file \"%s\" on line %d: %s",
169+
fstate->filename,fstate->lineno,buf);
168170
}
169171

170172
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp