Re: PATCH: Add hstore_to_json() - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: PATCH: Add hstore_to_json()
Date
Msg-id 4B41368D.60906@dunslane.net
Whole thread Raw
In response to Re: PATCH: Add hstore_to_json()  (Hitoshi Harada <umi.tanuki@gmail.com>)
List pgsql-hackers

Hitoshi Harada wrote:
> 2010/1/4 David E. Wheeler <david@kineticode.com>:
>   
>> On Jan 3, 2010, at 11:40 AM, Andrew Dunstan wrote:
>>
>>     
>>> We allow composites as fields. The biggest mismatch in the type model is probably w.r.t arrays. JSON arrays can be
heterogenousand non-rectangular, AIUI.
 
>>>       
>> Cool, that sounds right.
>>     
>
> Does it mean you should create composite type to create anonymous JSON?
>
>   


No, not in the least. We should still store JSON as text. We should 
simply be able to convert a JSON value to a record of an existing type 
(providing it has the right shape) and a record (of any shape) to JSON.

cheers

andrew


pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Re: PATCH: Add hstore_to_json()
Next
From: Takahiro Itagaki
Date:
Subject: Re: Verifying variable names in pgbench