Re: Fixed redundant i18n strings in json

From: David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixed redundant i18n strings in json
Date: 2014-08-08 01:06:19
Message-ID: CAKFQuwZANaGEvzi8z3vgiTN4ttRoutqL9gNcFzaPXOMEWOsyFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 7, 2014 at 5:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > Tom Lane-2 wrote
> >> 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.
>
> > The user documentation is worth emulating here:
> > http://www.postgresql.org/docs/9.4/interactive/functions-json.html
>
> > errmsg("argument count must be divisible by 2")
> > errhint("The argument list consists of alternating names and values")
>
> Seems reasonable to me.
>
> > Note that I s/keys/names/ to match said documentation.
>
> Hm. The docs aren't too consistent either: there are several other nearby
> places that say "keys". Notably, the functions json[b]_object_keys() have
> that usage embedded in their names, where we can't readily change it.
>
> I'm inclined to think we should s/names/keys/ in the docs instead.
> Thoughts?
>
>
Agreed - have the docs match the common API term usage in our
implementation.

Not sure its worth a thorough hunt but at least fix them as they are
noticed.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-08-08 01:16:33 Re: Reporting the commit LSN at commit time
Previous Message Craig Ringer 2014-08-08 01:06:06 Re: Reporting the commit LSN at commit time