Re: Mention column name in error messages - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Mention column name in error messages
Date
Msg-id 20150915051235.GC88970@alvherre.pgsql
Whole thread Raw
In response to Re: Mention column name in error messages  (Franck Verrot <franck@verrot.fr>)
Responses Re: Mention column name in error messages  (Franck Verrot <franck@verrot.fr>)
List 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



pgsql-hackers by date:

Previous
From: Franck Verrot
Date:
Subject: Re: Mention column name in error messages
Next
From: Tom Lane
Date:
Subject: Re: row_security GUC, BYPASSRLS