Implement the DO statement to support execution of PL code without having
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Sep 2009 23:43:43 +0000 (23:43 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Sep 2009 23:43:43 +0000 (23:43 +0000)
commit6e8a5bd908926d58ab37a8de82e8365a2ae2fc90
tree3890b6da3827101dff7cd4091bad10a87b2c433e
parenta05d8f2a93e31ed13a2e223fd24812a8507bbc84
Implement the DO statement to support execution of PL code without having
to create a function for it.

Procedural languages now have an additional entry point, namely a function
to execute an inline code block.  This seemed a better design than trying
to hide the transient-ness of the code from the PL.  As of this patch, only
plpgsql has an inline handler, but probably people will soon write handlers
for the other standard PLs.

In passing, remove the long-dead LANCOMPILER option of CREATE LANGUAGE.

Petr Jelinek
34 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/config.sgml
doc/src/sgml/keywords.sgml
doc/src/sgml/ref/allfiles.sgml
doc/src/sgml/ref/create_language.sgml
doc/src/sgml/ref/do.sgml [new file with mode: 0644]
doc/src/sgml/reference.sgml
doc/src/sgml/xplang.sgml
src/backend/catalog/pg_proc.c
src/backend/commands/functioncmds.c
src/backend/commands/proclang.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/tcop/utility.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/scripts/droplang.c
src/include/catalog/catversion.h
src/include/catalog/pg_language.h
src/include/catalog/pg_pltemplate.h
src/include/commands/defrem.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/parser/kwlist.h
src/include/utils/guc.h
src/interfaces/ecpg/preproc/ecpg.trailer
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_handler.c
src/pl/plpgsql/src/plpgsql.h
src/test/regress/expected/plpgsql.out
src/test/regress/sql/plpgsql.sql