Rajeev rastogi <rajeev.rast...@huawei.com> writes: > [ updated patch ]
I've committed this patch with additional revisions. > Based on my analysis, I observed that just file pointer comparison may not be > sufficient > to decide whether to display command tag or not. E.g. imagine below scenario: > psql.exe -d postgres -o 'file.dat' -c " \copy tbl to 'file.dat';" I don't think it's our responsibility to avoid printing both data and status to the same place in such cases; arguably, in fact, that's exactly what the user told us to do. The important thing is to avoid printing both for the straightforward case of COPY TO STDOUT. For that, file pointer comparison is the right thing, since the option-parsing code will set copysource to match queryFout in exactly the relevant cases. In any case, this revised patch suppressed the status print in *all* COPY_OUT cases, which surely seems like throwing the baby out with the bathwater. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers