Moving to -hackers.
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Alvaro Herrera wrote:
> >> Tom Lane wrote:
> >>> Actually, I think the general convention is to NOT quote type names
> >>> in error messages.
> >> Ok, I'll change it.
> > Done.
> Thanks. Should we make a push to get rid of hard-wired type names in
> other messages? There's still quite a few "invalid input syntax for ..."
> instances that could be whacked until they all share the same translatable
Ah, I hadn't noticed those precisely because they lack the quotes ... I
grepped for 'type \"%' and found a few matches but didn't seem
interesting enough since there's only one of each, such as
errmsg("constant of the type \"regrole\" cannot be used here")
The 'invalid input syntax' are much more numerous. Also the "value XYZ
is out of range" messages. Both of those seem definitely worth fixing.
I also saw "value too long" for char/varchar but they're only two
distinct messages and fixing those would require printing the maxlen in
place before raising the message -- probably not worth the trouble.
I also found these while paging through grep results,
src/backend/utils/adt/json.c: errmsg("could not determine data type for argument 1")));
src/backend/utils/adt/json.c: errmsg("could not determine data type for argument 2")));
src/backend/utils/adt/json.c: errmsg("could not determine data type for argument %d",
which seem worth merging too.
If nobody opposes, I will fix those after feature freeze.
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
In response to
pgsql-hackers by date
|Next:||From: Oleg Bartunov||Date: 2016-04-01 17:08:33|
|Subject: Re: [PATCH] Phrase search ported to 9.6|
|Previous:||From: David G. Johnston||Date: 2016-04-01 16:57:31|
|Subject: Re: syntax sugar for conditional check|
pgsql-committers by date
|Next:||From: Teodor Sigaev||Date: 2016-04-01 17:11:57|
|Subject: pgsql: Fixes in bloom contrib module missed during review|
|Previous:||From: Tom Lane||Date: 2016-04-01 16:43:50|
|Subject: Re: pgsql: Improve internationalization of messages involving type names|