diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index 5e69d29b6c..ebe5ee9ea5 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -586,7 +586,8 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary) } } - pset.lineno++; + if (copystream == pset.cur_cmd_source) + pset.lineno++; } }