| From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | redundant error messages |
| Date: | 2020-11-05 12:27:21 |
| Message-ID: | 3e937641-88a1-e697-612e-99bba4b8e5e4@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
A few client tools duplicate error messages already provided by libpq,
such as
pg_rewind: fatal: could not connect to server: could not connect to
server: No such file or directory
pg_basebackup: error: could not connect to server: could not connect to
server: No such file or directory
psql: error: could not connect to server: could not connect to server:
No such file or directory
The psql case is actually a regression introduced in PG12, but the other
two appear to be ancient.
Other client tools provide a different error message so in aggregate it
looks like this:
createdb: error: could not connect to database template1: could not
connect to server: No such file or directory
The attached patch removes the redundant message from the client tools.
I suppose it's a bit dubious because there is no guarantee what the
level of detail the message supplied by libpq has. But I think these
few cases are not particularly hard to keep in sync.
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-redundant-error-messages-in-client-tools.patch | text/plain | 2.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2020-11-05 12:28:34 | Re: Move OpenSSL random under USE_OPENSSL_RANDOM |
| Previous Message | Daniel Gustafsson | 2020-11-05 12:18:15 | Re: Move OpenSSL random under USE_OPENSSL_RANDOM |