Re: Fixed redundant i18n strings in json

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Fixed redundant i18n strings in json
Дата
Msg-id
25107.1407459216@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Fixed redundant i18n strings in json Daniele Varrazzo <daniele.varrazzo@gmail.com>
Re: Fixed redundant i18n strings in json Robert Haas <robertmhaas@gmail.com>
Re: Fixed redundant i18n strings in json Daniele Varrazzo <daniele.varrazzo@gmail.com>
Re: Fixed redundant i18n strings in json Robert Haas <robertmhaas@gmail.com>
Re: Fixed redundant i18n strings in json Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixed redundant i18n strings in json David G Johnston <david.g.johnston@gmail.com>
Re: Fixed redundant i18n strings in json Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixed redundant i18n strings in json David Johnston <david.g.johnston@gmail.com>
Re: Fixed redundant i18n strings in json Jeff Janes <jeff.janes@gmail.com>
Re: Fixed redundant i18n strings in json Robert Haas <robertmhaas@gmail.com>
Re: Fixed redundant i18n strings in json Jeff Janes <jeff.janes@gmail.com>
Re: Fixed redundant i18n strings in json Robert Haas <robertmhaas@gmail.com>
Re: Fixed redundant i18n strings in json Michael Paquier <michael.paquier@gmail.com>
David G Johnston  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?
		regards, tom lane


В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
Сообщение: Re: Minmax indexes
От: Peter Geoghegan
Дата:
Сообщение: Re: Minmax indexes
FAQ