Re: Error detail/hint style fixup - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Error detail/hint style fixup
Date
Msg-id 09673676-6B66-48BD-80FD-2B7C19A79845@yesql.se
Whole thread Raw
In response to Re: Error detail/hint style fixup  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Error detail/hint style fixup  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> On 19 Mar 2018, at 17:47, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>> Attached patch ensures that (i) details and hints have leading capitalization,
>> have double spaces after punctuation and ends with period; (ii) context should
>> not be capitalized and should not end with period; (iii) test .out files match
>> the changes.
>
> +1 for cleaning this up, but I wonder if you've gone far enough in
> adjusting the style of errcontext() messages.

Thanks for looking/reviewing.

> I'm thinking what we should actually be printing is more like
>
> CONTEXT:  while opening cursor on dblink connection named “unnamed"

I agree that the contexts in dblink were pretty unhelpful with redundant
language.  I took a stab at this, the attached patch extends dblink_res_error()
to improve the context.  Including the cursorname in the context seemed to be
in line with the errmsg’s in dblink.

Looking around at other errcontext’s I can’t see any other cases that warrant
attention.

cheers ./daniel


Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: inserts into partitioned table may cause crash
Next
From: Tom Lane
Date:
Subject: Re: neqjoinsel versus "refresh materialized view concurrently"