Re: PATCH: Add hstore_to_json()

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: PATCH: Add hstore_to_json()
Дата
Msg-id 4B40F292.5040809@dunslane.net
обсуждение исходный текст
Ответ на Re: PATCH: Add hstore_to_json()  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: PATCH: Add hstore_to_json()  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers

David E. Wheeler wrote:
> On Jan 3, 2010, at 8:00 AM, Andrew Dunstan wrote:
>
>   
>> I think the minimal functionality I'd want is:
>>
>>   convert record to JSON
>>   convert JSON to record
>>     
>
> With caveats as to dealing with nested structures (can a record be an attribute of a record?).
>   


We allow composites as fields. The biggest mismatch in the type model is 
probably w.r.t arrays. JSON arrays can be heterogenous and 
non-rectangular, AIUI.


>   
>>   extract a value, or set of values, from JSON
>>   composition of JSON
>>     
>
> There's a lot of functionality in hstore that I'd like to see. It'd make sense to use the same operators for the same
operations.I think I'd start with hstore as a basic spec.
 
>
>
>   

OK, but hstores are flat, unlike JSON. We need some way to do the 
equivalent of xpath along the child axis and without predicate tests. 
hstore has no real equivalent because it has no nesting.

cheers

andrew


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: win32 socket definition
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: invalid UTF-8 via pl/perl