Content-Length: 273463 | pFad | http://github.com/postgrespro/postgres/commit/3639d08e2f36f76e9a626c60b534c7fe204f329c

D3 pg_dump: Fix weird error message composition · postgrespro/postgres@3639d08 · GitHub
Skip to content

Commit 3639d08

Browse files
committed
pg_dump: Fix weird error message composition
The previous way could make it look like "stdin" was the actual input file name. Write it as two separate messages instead.
1 parent 16a3415 commit 3639d08

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/3639d08e2f36f76e9a626c60b534c7fe204f329c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy