Re: is JSON really "a type" (Re: data to json enhancements)
От
Andrew Dunstan
Тема
Re: is JSON really "a type" (Re: data to json enhancements)
Дата
Msg-id
50676828.10407@dunslane.net
Ответ на
Re: is JSON really "a type" (Re: data to json enhancements) (Hannu Krosing)
Список
Дерево обсуждения
data to json enhancements Andrew Dunstan <andrew@dunslane.net>
Re: data to json enhancements Tom Lane <tgl@sss.pgh.pa.us>
Re: data to json enhancements Andrew Dunstan <andrew@dunslane.net>
Re: data to json enhancements Hannu Krosing <hannu@krosing.net>
is JSON really "a type" (Re: data to json enhancements) Hannu Krosing <hannu@krosing.net>
Re: is JSON really "a type" (Re: data to json enhancements) Andrew Dunstan <andrew@dunslane.net>
Re: is JSON really "a type" (Re: data to json enhancements) Hannu Krosing <hannu@krosing.net>
Re: is JSON really "a type" (Re: data to json enhancements) Andrew Dunstan <andrew@dunslane.net>
Re: is JSON really "a type" (Re: data to json enhancements) Hannu Krosing <hannu@krosing.net>
Re: is JSON really "a type" (Re: data to json enhancements) Misa Simic <misa.simic@gmail.com>
Re: is JSON really "a type" (Re: data to json enhancements) Darren Duncan <darren@darrenduncan.net>
Re: data to json enhancements Robert Haas <robertmhaas@gmail.com>
Re: data to json enhancements Andrew Dunstan <andrew@dunslane.net>
Re: data to json enhancements Tom Lane <tgl@sss.pgh.pa.us>
Re: data to json enhancements Andrew Dunstan <andrew@dunslane.net>
Re: data to json enhancements Hannu Krosing <hannu@krosing.net>
Re: data to json enhancements Andrew Dunstan <andrew@dunslane.net>
Re: data to json enhancements Hannu Krosing <hannu@krosing.net>
Re: data to json enhancements Peter Eisentraut <peter_e@gmx.net>
Re: data to json enhancements Andrew Dunstan <andrew@dunslane.net>
Re: data to json enhancements Misa Simic <misa.simic@gmail.com>
Re: data to json enhancements Andrew Dunstan <andrew@dunslane.net>
Re: data to json enhancements Misa Simic <misa.simic@gmail.com>
Re: data to json enhancements Robert Haas <robertmhaas@gmail.com>
Re: data to json enhancements Merlin Moncure <mmoncure@gmail.com>
Re: data to json enhancements Misa Simic <misa.simic@gmail.com>
On 09/29/2012 05:01 PM, Hannu Krosing wrote: > On 09/29/2012 05:40 PM, Andrew Dunstan wrote: >> >> I still think Tom's suggestion is the best and simplest way to do that. > which Toms suggestion you mean here ? > > The 3. mentioned above was for making possible 2 separate ways to > convert (serialise/quote/escape and parse/check-for-valid-json) string > to json and afair not about hstore to json. Er, what? yes, I meant option 3, and it is a perfect mechanism for doing conversion of an hstore field inside datum_to_json: the code would look for a cast to the new type (whatever we call it) and use that instead of the normal text representation. > > I'm also looking forward for an easy way or two to populate a record > from json and extract an array from json. I am prepared to take this on - at least starting with json to array which I think is the simpler case. I have some ideas about how to do this and have done a bit of experimental work along these lines. Personally I'd be inclined to make it do a conversion to text[] and then cast from that to anything else we needed. cheers andrew
В списке pgsql-hackers по дате отправления
От: Hannu Krosing
Дата: