Re: Mention column name in error messages

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Franck Verrot <franck(at)verrot(dot)fr>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Mention column name in error messages
Date: 2015-09-15 05:12:35
Message-ID: 20150915051235.GC88970@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Franck Verrot wrote:
> On Wed, Aug 19, 2015 at 11:31 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-09-15 05:18:44 Re: row_security GUC, BYPASSRLS
Previous Message Noah Misch 2015-09-15 05:00:15 Re: row_security GUC, BYPASSRLS