1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

Transforms for jsonb to PL/Perl

Add a new contrib module jsonb_plperl that provides a transform between
jsonb and PL/Perl.  jsonb values are converted to appropriate Perl types
such as arrays and hashes, and vice versa.

Author: Anthony Bykov <a.bykov@postgrespro.ru>
Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
Reviewed-by: Aleksander Alekseev <a.alekseev@postgrespro.ru>
Reviewed-by: Nikita Glukhov <n.gluhov@postgrespro.ru>
This commit is contained in:
Peter Eisentraut
2018-04-03 09:47:18 -04:00
parent a08dc71195
commit 341e166180
13 changed files with 963 additions and 4 deletions

View File

@ -575,8 +575,17 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
<para>
Additional extensions are available that implement transforms for the
<type>jsonb</type> type for the language PL/Python. The extensions for
PL/Python are called <literal>jsonb_plpythonu</literal>,
<type>jsonb</type> type for different procedural languages.
</para>
<para>
The extensions for PL/Perl are called <literal>jsonb_plperl</literal> and
<literal>jsonb_plperlu</literal>. If you use them, <type>jsonb</type>
values are mapped to Perl arrays, hashes, and scalars, as appropriate.
</para>
<para>
The extensions for PL/Python are called <literal>jsonb_plpythonu</literal>,
<literal>jsonb_plpython2u</literal>, and
<literal>jsonb_plpython3u</literal> (see <xref
linkend="plpython-python23"/> for the PL/Python naming convention). If you