From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Michael Banck <michael(dot)banck(at)credativ(dot)de> |
Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net> |
Subject: | Re: pg_basebackup: Missing newlines in some error messages |
Date: | 2018-03-21 12:57:08 |
Message-ID: | 20180321125708.i3bkpdxxaarky7fi@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Banck | 2018-03-21 12:58:52 | Re: pg_basebackup: Missing newlines in some error messages |
Previous Message | Alvaro Herrera | 2018-03-21 12:54:39 | Re: pg_basebackup: Missing newlines in some error messages |