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

From Andrew Dunstan
Subject Re: PATCH: Add hstore_to_json()
Date
Msg-id 4B2BD9EF.7040308@dunslane.net
Whole thread Raw
In response to Re: PATCH: Add hstore_to_json()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PATCH: Add hstore_to_json()  (Bruce Momjian <bruce@momjian.us>)
Re: PATCH: Add hstore_to_json()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> You're correct that we don't necessarily need a new type, we could just 
>> make it text and have a bunch of operations, but that seems to violate 
>> the principle of data type abstraction a bit.
>>     
>
> I think the relevant precedent is that we have an xml type.  While I
> surely don't want to follow the SQL committee's precedent of inventing
> a ton of special syntax for xml support, it might be useful to look at
> that for suggestions of what functionality would be useful for a json
> type.
>
> [ I can already hear somebody insisting on a yaml type :-( ]
>
>             
>   

Now that's a case where I think a couple of converter functions at most 
should meet the need.

cheers

andrew


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Removing pg_migrator limitations
Next
From: Bruce Momjian
Date:
Subject: Re: PATCH: Add hstore_to_json()