Re: Mention column name in error messages
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Franck Verrot <franck@verrot.fr>
Cc: Jeff Janes <jeff.janes@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2015-09-15T05:12:35Z
Lists: pgsql-hackers
Franck Verrot wrote: > On Wed, Aug 19, 2015 at 11:31 PM, Jeff Janes <jeff.janes@gmail.com> wrote: > > > > I took this for a test drive, and had some comments.on the user visible > > parts. > > [...] > > But I think these belong as CONTEXT or as DETAIL, not as HINT. The > > messages are giving me details about where (which column) the error > > occurred, they aren't giving suggestions to me about what to do about it. > > > > Hi Jeff, > > Somehow my email never went through. So thank you for the test drive, I've > tried to update my patch (that you will find attached) to reflect what you > said (DETAIL instead of HINT). I think you need errcontext(), not errdetail(). The most important difference is that you can have multiple CONTEXT lines but only one DETAIL; I think if you attach a second errdetail(), the first one is overwritten. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Improve logging of bad parameter values in BIND messages.
- 1ea396362be1 14.0 landed