Re: json results parsing

Поиск
Список
Период
Сортировка
Искать
От
Michael Paquier
Тема
Re: json results parsing
Дата
в 06:32:53
Msg-id
20180531033253.GA1161@paquier.xyz
Ответ на
json results parsing (Charles Cui)
Список
Дерево обсуждения
json results parsing Charles Cui <charles.cui1984@gmail.com>
Re: json results parsing Michael Paquier <michael@paquier.xyz>
Re: json results parsing Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: json results parsing Charles Cui <charles.cui1984@gmail.com>
Re: json results parsing Chapman Flack <chap@anastigmatix.net>
Re: json results parsing Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: json results parsing Andrew Gierth <andrew@tao11.riddles.org.uk>
On Wed, May 30, 2018 at 08:16:18PM -0700, Charles Cui wrote:
> Basically, I want to call these json API inside a plugin, and the return
> value for these APIs are Datum. I am wondering how to parse a set of json
> results from Datum in postgresql? Seems the helper functions I am aware of
> are only for simple types. Are there any examples to demonstrate the best
> practice of how to do that?

When it comes to the manipulation of data which uses a given data type,
you may want to look at how the input and output functions of this data
type work to understand how they can be fetched and saved.  In the case
of json, that would be looking at respectively json_in and json_out.
Each type (and its array representation) has its own row within the
system catalog pg_type, where the input function is marked with
typinput, and the output as typoutput.

I hope that helps.
--
Michael
В списке pgsql-hackers по дате отправления
От: Euler Taveira
Дата:
От: Andrew Gierth
Дата:
Сообщение: Re: json results parsing
FAQ