Re: JSON for PG 9.2

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: JSON for PG 9.2
Дата
Msg-id 4F282BB0.4060309@dunslane.net
обсуждение исходный текст
Ответ на Re: JSON for PG 9.2  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: JSON for PG 9.2  (Josh Berkus <josh@agliodbs.com>)
Re: JSON for PG 9.2  (Hannu Krosing <hannu@krosing.net>)
Список pgsql-hackers

On 01/30/2012 10:37 AM, Andrew Dunstan wrote:
>
>
>> Aside: is query_to_json really necessary? It seems rather ugly and
>> easily avoidable using row_to_json.
>>
>
> I started with this, again by analogy with query_to_xml(). But I agree 
> it's a bit ugly. If we're not going to do it, then we definitely need 
> to look at caching the output funcs in the function info. A closer 
> approximation is actually:
>
>    SELECT array_to_json(array_agg(q))
>    FROM ( your query here ) q;
>
>
> But then I'd want the ability to break that up a bit with line feeds, 
> so we'd need to adjust the interface slightly. (Hint: don't try the 
> above with "select * from pg_class".)
>
>
> I'll wait on further comments, but I can probably turn these changes 
> around very quickly once we're agreed.
>
>
>

based on Abhijit's feeling and some discussion offline, the consensus 
seems to be to remove query_to_json.

cheers

andrew


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

Предыдущее
От: "Soules, Craig"
Дата:
Сообщение: Issues with C++ exception handling in an FDW
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Proposal for a new severity level