Alvaro Herrera wrote:
> Hi
>
> Michael Banck wrote:
>
> > I apparently managed to screw up so badly that no PQerrorMessage was
> > set, so saw the above (which indeed has no error message after the
> > colon).
>
> Well, maybe that's a different bug, then: maybe we should print
> something other than PQerrorMessage (or maybe PQerrorMessage should not
> return empty!). Can you reproduce the problem?
The code does look a bit weird,
/*
* Get the COPY data
*/
res = PQgetResult(conn);
if (PQresultStatus(res) != PGRES_COPY_OUT)
{
fprintf(stderr, _("%s: could not get COPY data stream: %s"),
progname, PQerrorMessage(conn));
Note that noplace we check that there is actually an error. So maybe
the conn got a result status other than COPY_OUT that's not an error ...
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services