Re: Error detail/hint style fixup

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-03-19T21:08:44Z
Lists: pgsql-hackers

Attachments

> 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

Commits

  1. Improve style guideline compliance of assorted error-report messages.