Re: json results parsing

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: json results parsing
Дата
Msg-id 20180531033253.GA1161@paquier.xyz
обсуждение исходный текст
Ответ на json results parsing  (Charles Cui <charles.cui1984@gmail.com>)
Список pgsql-hackers
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
Дата:
Сообщение: Re: ALTER CONSTRAINT change action
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: json results parsing