1 /* contrib/hstore_plpython/hstore_plpython2u--1.0.sql */
3 -- complain if script is sourced in psql, rather than via CREATE EXTENSION
4 \echo Use "CREATE EXTENSION hstore_plpython2u" to load this file. \quit
6 CREATE FUNCTION hstore_to_plpython2(val internal) RETURNS internal
7 LANGUAGE C STRICT IMMUTABLE
8 AS 'MODULE_PATHNAME', 'hstore_to_plpython';
10 CREATE FUNCTION plpython2_to_hstore(val internal) RETURNS hstore
11 LANGUAGE C STRICT IMMUTABLE
12 AS 'MODULE_PATHNAME', 'plpython_to_hstore';
14 CREATE TRANSFORM FOR hstore LANGUAGE plpython2u (
15 FROM SQL WITH FUNCTION hstore_to_plpython2(internal),
16 TO SQL WITH FUNCTION plpython2_to_hstore(internal)
19 COMMENT ON TRANSFORM FOR hstore LANGUAGE plpython2u IS 'transform between hstore and Python dict';