Re: Fixed redundant i18n strings in json - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixed redundant i18n strings in json
Date
Msg-id 18716.1407439692@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixed redundant i18n strings in json  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Fixed redundant i18n strings in json
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sat, Aug 2, 2014 at 9:15 AM, Daniele Varrazzo
> <daniele.varrazzo@gmail.com> wrote:
>> I'd definitely replace /arg/argument/. Furthermore I'd avoid the form
>> "argument 1: something is wrong": the string is likely to end up in
>> sentences with other colons so I'd rather use "something is wrong at
>> argument 1".
>> 
>> Is the patch attached better?

> Looks OK to me.  I thought someone else might comment, but since no
> one has, committed.

It looks to me like this is still wrong:
   if (nargs % 2 != 0)       ereport(ERROR,               (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                errmsg("invalid number or arguments: object must be matched key value pairs")));
+                errmsg("invalid number or arguments"),
+                errhint("Object must be matched key value pairs.")));

Surely that was meant to read "invalid number OF arguments".  The errhint
is only charitably described as English, as well.  I'd suggest something
like "Arguments of json_build_object() must be pairs of keys and values."
--- but maybe someone else can phrase that better.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)
Next
From: Pavel Stehule
Date:
Subject: Re: psql: show only failed queries