Add transforms feature

Peter Eisentraut <peter_e@gmx.net>

Commit: cac76582053ef8ea07df65fed0757f352da23705
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2015-04-26T14:33:14Z
Releases: 9.5.0
Add transforms feature

This provides a mechanism for specifying conversions between SQL data
types and procedural languages.  As examples, there are transforms
for hstore and ltree for PL/Perl and PL/Python.

reviews by Pavel Stěhule and Andres Freund

Files

PathChange+/−
contrib/hstore_plperl/expected/create_transform.out added +74 −0
contrib/hstore_plperl/expected/hstore_plperl.out added +213 −0
contrib/hstore_plperl/.gitignore added +4 −0
contrib/hstore_plperl/hstore_plperl--1.0.sql added +17 −0
contrib/hstore_plperl/hstore_plperl.c added +90 −0
contrib/hstore_plperl/hstore_plperl.control added +6 −0
contrib/hstore_plperl/hstore_plperlu--1.0.sql added +17 −0
contrib/hstore_plperl/hstore_plperlu.control added +6 −0
contrib/hstore_plperl/Makefile added +24 −0
contrib/hstore_plperl/sql/create_transform.sql added +47 −0
contrib/hstore_plperl/sql/hstore_plperl.sql added +148 −0
contrib/hstore_plpython/expected/hstore_plpython.out added +132 −0
contrib/hstore_plpython/.gitignore added +6 −0
contrib/hstore_plpython/hstore_plpython2u--1.0.sql added +19 −0
contrib/hstore_plpython/hstore_plpython2u.control added +6 −0
contrib/hstore_plpython/hstore_plpython3u--1.0.sql added +19 −0
contrib/hstore_plpython/hstore_plpython3u.control added +6 −0
contrib/hstore_plpython/hstore_plpython.c added +116 −0
contrib/hstore_plpython/hstore_plpythonu--1.0.sql added +19 −0
contrib/hstore_plpython/hstore_plpythonu.control added +6 −0
contrib/hstore_plpython/Makefile added +31 −0
contrib/hstore_plpython/sql/hstore_plpython.sql added +103 −0
contrib/ltree_plpython/expected/ltree_plpython.out added +45 −0
contrib/ltree_plpython/.gitignore added +6 −0
contrib/ltree_plpython/ltree_plpython2u--1.0.sql added +12 −0
contrib/ltree_plpython/ltree_plpython2u.control added +6 −0
contrib/ltree_plpython/ltree_plpython3u--1.0.sql added +12 −0
contrib/ltree_plpython/ltree_plpython3u.control added +6 −0
contrib/ltree_plpython/ltree_plpython.c added +32 −0
contrib/ltree_plpython/ltree_plpythonu--1.0.sql added +12 −0
contrib/ltree_plpython/ltree_plpythonu.control added +6 −0
contrib/ltree_plpython/Makefile added +31 −0
contrib/ltree_plpython/sql/ltree_plpython.sql added +37 −0
contrib/Makefile modified +12 −0
doc/src/sgml/catalogs.sgml modified +82 −0
doc/src/sgml/hstore.sgml modified +19 −0
doc/src/sgml/information_schema.sgml modified +85 −0
doc/src/sgml/ltree.sgml modified +15 −0
doc/src/sgml/ref/allfiles.sgml modified +2 −0
doc/src/sgml/ref/alter_extension.sgml modified +21 −0
doc/src/sgml/ref/comment.sgml modified +22 −0
doc/src/sgml/ref/create_function.sgml modified +18 −0
doc/src/sgml/ref/create_transform.sgml added +207 −0
doc/src/sgml/ref/drop_transform.sgml added +123 −0
doc/src/sgml/reference.sgml modified +2 −0
src/backend/catalog/dependency.c modified +8 −0
src/backend/catalog/information_schema.sql modified +33 −1
src/backend/catalog/Makefile modified +1 −0
src/backend/catalog/objectaddress.c modified +53 −12
src/backend/catalog/pg_aggregate.c modified +1 −0
src/backend/catalog/pg_proc.c modified +45 −1
src/backend/commands/dropcmds.c modified +8 −0
src/backend/commands/event_trigger.c modified +3 −0
src/backend/commands/functioncmds.c modified +341 −2
src/backend/commands/proclang.c modified +3 −0
src/backend/commands/typecmds.c modified +1 −0
src/backend/nodes/copyfuncs.c modified +17 −0
src/backend/nodes/equalfuncs.c modified +15 −0
src/backend/parser/gram.y modified +87 −3
src/backend/tcop/utility.c modified +16 −0
src/backend/utils/adt/ruleutils.c modified +29 −10
src/backend/utils/cache/lsyscache.c modified +71 −0
src/backend/utils/cache/syscache.c modified +23 −0
src/backend/utils/fmgr/funcapi.c modified +44 −0
src/bin/pg_dump/common.c modified +5 −0
src/bin/pg_dump/pg_dump.c modified +271 −2
src/bin/pg_dump/pg_dump.h modified +11 −0
src/bin/pg_dump/pg_dump_sort.c modified +10 −1
src/include/catalog/catversion.h modified +1 −1
src/include/catalog/dependency.h modified +1 −0
src/include/catalog/indexing.h modified +5 −0
src/include/catalog/pg_class.h modified +1 −1
src/include/catalog/pg_proc_fn.h modified +3 −0
src/include/catalog/pg_proc.h modified +2692 −2690
src/include/catalog/pg_transform.h added +47 −0
src/include/commands/defrem.h modified +3 −0
src/include/funcapi.h modified +1 −0
src/include/nodes/nodes.h modified +1 −0
src/include/nodes/parsenodes.h modified +15 −0
src/include/parser/kwlist.h modified +2 −0
src/include/utils/lsyscache.h modified +3 −0
src/include/utils/syscache.h modified +2 −0
src/interfaces/ecpg/preproc/ecpg_keywords.c modified +0 −2
src/interfaces/ecpg/preproc/ecpg.tokens modified +1 −1
src/interfaces/ecpg/preproc/ecpg.trailer modified +2 −3
src/Makefile.shlib modified +1 −1
src/pl/plperl/GNUmakefile modified +3 −1
src/pl/plperl/plperl.c modified +43 −4
src/pl/plperl/plperl_helpers.h modified +2 −0
src/pl/plpython/Makefile modified +4 −36
src/pl/plpython/plpy_main.c modified +1 −0
src/pl/plpython/plpy_procedure.c modified +41 −2
src/pl/plpython/plpy_procedure.h modified +2 −0
src/pl/plpython/plpy_spi.c modified +2 −1
src/pl/plpython/plpython.h modified +1 −0
src/pl/plpython/plpy_typeio.c modified +103 −56
src/pl/plpython/plpy_typeio.h modified +7 −2
src/pl/plpython/plpy_util.c modified +16 −5
src/pl/plpython/plpy_util.h modified +1 −0
src/pl/plpython/regress-python3-mangle.mk added +35 −0
src/test/regress/expected/sanity_check.out modified +1 −0