Re: JSON Function Bike Shedding

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: JSON Function Bike Shedding
Дата
Msg-id 20130216200528.GC15069@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: JSON Function Bike Shedding  ("David E. Wheeler" <david@justatheory.com>)
Ответы Re: JSON Function Bike Shedding  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 2013-02-16 11:55:26 -0800, David E. Wheeler wrote:
> On Feb 16, 2013, at 8:57 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
> 
> > I have had a look at doing something like this with the json_get functions. The trouble is that the best way to do
itis to have json_get take "variadic any", but then string literals come in as unknown rather than as text, which makes
thingsfairly ugly. If we force people to cast path elements to text then I think the cure is worse than the disease. I
thinkthe best we can do here is possibly to provide json_get and json_get_text taking either a single int or variadic
text[],and json_get_path and json_get_path_text taking non-variadic text[].
 
> 
> Why not also one taking a single text?
> 
>     get(text)
>     get(int)
>     get(variadic text[])

Those aren't differentiable by their argument types. Why should json be
able to claim that namespace and not other datatypes?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: JSON Function Bike Shedding
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: JSON Function Bike Shedding