Debian Codegraph @

contrib/hstore_plpython/hstore_plpython3u--1.0.sql

raw
1 /* contrib/hstore_plpython/hstore_plpython3u--1.0.sql */
2
3 -- complain if script is sourced in psql, rather than via CREATE EXTENSION
4 \echo Use "CREATE EXTENSION hstore_plpython3u" to load this file. \quit
5
6 CREATE FUNCTION hstore_to_plpython3(val internal) RETURNS internal
7 LANGUAGE C STRICT IMMUTABLE
8 AS 'MODULE_PATHNAME', 'hstore_to_plpython';
9
10 CREATE FUNCTION plpython3_to_hstore(val internal) RETURNS @extschema:[email protected]
11 LANGUAGE C STRICT IMMUTABLE
12 AS 'MODULE_PATHNAME', 'plpython_to_hstore';
13
14 CREATE TRANSFORM FOR @extschema:[email protected] LANGUAGE plpython3u (
15 FROM SQL WITH FUNCTION hstore_to_plpython3(internal),
16 TO SQL WITH FUNCTION plpython3_to_hstore(internal)
17 );
18
19 COMMENT ON TRANSFORM FOR @extschema:[email protected] LANGUAGE plpython3u IS 'transform between hstore and Python dict';