1 /* contrib/jsonb_plperl/jsonb_plperlu--1.0.sql */
3 -- complain if script is sourced in psql, rather than via CREATE EXTENSION
4 \echo Use "CREATE EXTENSION jsonb_plperlu" to load this file. \quit
6 CREATE FUNCTION jsonb_to_plperlu(val internal) RETURNS internal
7 LANGUAGE C STRICT IMMUTABLE
8 AS 'MODULE_PATHNAME', 'jsonb_to_plperl';
10 CREATE FUNCTION plperlu_to_jsonb(val internal) RETURNS jsonb
11 LANGUAGE C STRICT IMMUTABLE
12 AS 'MODULE_PATHNAME', 'plperl_to_jsonb';
14 CREATE TRANSFORM FOR jsonb LANGUAGE plperlu (
15 FROM SQL WITH FUNCTION jsonb_to_plperlu(internal),
16 TO SQL WITH FUNCTION plperlu_to_jsonb(internal)
19 COMMENT ON TRANSFORM FOR jsonb LANGUAGE plperlu IS 'transform between jsonb and Perl';