Re: redundant error messages
Isaac Morland <isaac.morland@gmail.com>
From: Isaac Morland <isaac.morland@gmail.com>
To: Euler Taveira <euler.taveira@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-11-05T14:49:32Z
Lists: pgsql-hackers
On Thu, 5 Nov 2020 at 08:34, Euler Taveira <euler.taveira@2ndquadrant.com> wrote: Is the database name important for this message? You should inform which > database you want to connect for all client tools except pg_dumpall. > Hence, you > already know which database has the connection problem. IMO the pg_dumpall > message should inform the database name. My suggestion is: > In principle, the client knows the database name. In practice, if it's coming from PGDATABASE or via a service configuration, one may be confused about the database; having the error message be explicit will avoid many problems. I can easily imagine that "unable to connect to database" would be mystifying, whereas "unable to connect to database foo" would elicit the response, "wait, I'm trying to connect to what now?" leading much more quickly to a resolution.
Commits
-
Fix redundant error messages in client tools
- 6be725e70161 14.0 landed
- f3ad4fddfaf7 13.1 landed
- 24bbdaa6feac 9.5.24 landed
- 8096be26178b 9.6.20 landed
- 468bed27ce8d 10.15 landed
- 42c088be1889 11.10 landed
- 16eadc4695ef 12.5 landed