From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Chapman Flack <chap(at)anastigmatix(dot)net> |
Cc: | Charles Cui <charles(dot)cui1984(at)gmail(dot)com>, Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, Aleksandr Parfenov <a(dot)parfenov(at)postgrespro(dot)ru>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: json results parsing |
Date: | 2018-06-01 02:16:53 |
Message-ID: | 87sh67xnhe.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>>>> "Chapman" == Chapman Flack <chap(at)anastigmatix(dot)net> writes:
>> To clarify, I think my question is functions like json_each or
>> json_object_keys() are
>> set returning functions (
>> https://www.postgresql.org/docs/9.5/static/functions-srf.html)
>> which means it returns a set of results into a Datum.
Chapman> Well, it returns one result row as a Datum (either a single
Chapman> value or a tuple) each time it is called, until the whole set
Chapman> has been returned. The process is described here
Unfortunately that describes only one of the two calling protocols for
SRFs - the value-per-call mode, which as it happens is NOT the one that
json_each uses; that requires materialize mode, which is not actually
covered in the docs (but you can find examples in contrib/tablefunc).
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-06-01 02:59:04 | Re: behave of --create-slot option |
Previous Message | Chapman Flack | 2018-06-01 01:57:59 | Re: json results parsing |