From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Implement the DO statement to support execution of PL code |
Date: | 2009-09-22 23:43:43 |
Message-ID: | 20090922234343.B4246753FB7@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
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
Modified Files:
--------------
pgsql/doc/src/sgml:
catalogs.sgml (r2.206 -> r2.207)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/catalogs.sgml?r1=2.206&r2=2.207)
config.sgml (r1.228 -> r1.229)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml?r1=1.228&r2=1.229)
keywords.sgml (r2.25 -> r2.26)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/keywords.sgml?r1=2.25&r2=2.26)
reference.sgml (r1.67 -> r1.68)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/reference.sgml?r1=1.67&r2=1.68)
xplang.sgml (r1.34 -> r1.35)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/xplang.sgml?r1=1.34&r2=1.35)
pgsql/doc/src/sgml/ref:
allfiles.sgml (r1.74 -> r1.75)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/allfiles.sgml?r1=1.74&r2=1.75)
create_language.sgml (r1.45 -> r1.46)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_language.sgml?r1=1.45&r2=1.46)
pgsql/src/backend/catalog:
pg_proc.c (r1.164 -> r1.165)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_proc.c?r1=1.164&r2=1.165)
pgsql/src/backend/commands:
functioncmds.c (r1.110 -> r1.111)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/functioncmds.c?r1=1.110&r2=1.111)
proclang.c (r1.86 -> r1.87)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/proclang.c?r1=1.86&r2=1.87)
pgsql/src/backend/nodes:
copyfuncs.c (r1.437 -> r1.438)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c?r1=1.437&r2=1.438)
equalfuncs.c (r1.360 -> r1.361)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/equalfuncs.c?r1=1.360&r2=1.361)
pgsql/src/backend/parser:
gram.y (r2.678 -> r2.679)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.678&r2=2.679)
pgsql/src/backend/tcop:
utility.c (r1.313 -> r1.314)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/utility.c?r1=1.313&r2=1.314)
pgsql/src/backend/utils/misc:
guc.c (r1.518 -> r1.519)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.518&r2=1.519)
postgresql.conf.sample (r1.266 -> r1.267)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample?r1=1.266&r2=1.267)
pgsql/src/bin/pg_dump:
pg_dump.c (r1.547 -> r1.548)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c?r1=1.547&r2=1.548)
pg_dump.h (r1.156 -> r1.157)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.h?r1=1.156&r2=1.157)
pgsql/src/bin/scripts:
droplang.c (r1.31 -> r1.32)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/scripts/droplang.c?r1=1.31&r2=1.32)
pgsql/src/include/catalog:
catversion.h (r1.538 -> r1.539)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.538&r2=1.539)
pg_language.h (r1.34 -> r1.35)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_language.h?r1=1.34&r2=1.35)
pg_pltemplate.h (r1.7 -> r1.8)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_pltemplate.h?r1=1.7&r2=1.8)
pgsql/src/include/commands:
defrem.h (r1.96 -> r1.97)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/defrem.h?r1=1.96&r2=1.97)
pgsql/src/include/nodes:
nodes.h (r1.225 -> r1.226)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/nodes.h?r1=1.225&r2=1.226)
parsenodes.h (r1.401 -> r1.402)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h?r1=1.401&r2=1.402)
pgsql/src/include/parser:
kwlist.h (r1.2 -> r1.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/kwlist.h?r1=1.2&r2=1.3)
pgsql/src/include/utils:
guc.h (r1.104 -> r1.105)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc.h?r1=1.104&r2=1.105)
pgsql/src/interfaces/ecpg/preproc:
ecpg.trailer (r1.11 -> r1.12)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/ecpg.trailer?r1=1.11&r2=1.12)
pgsql/src/pl/plpgsql/src:
pl_comp.c (r1.138 -> r1.139)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_comp.c?r1=1.138&r2=1.139)
pl_handler.c (r1.45 -> r1.46)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_handler.c?r1=1.45&r2=1.46)
plpgsql.h (r1.115 -> r1.116)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h?r1=1.115&r2=1.116)
pgsql/src/test/regress/expected:
plpgsql.out (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/plpgsql.out?r1=1.73&r2=1.74)
pgsql/src/test/regress/sql:
plpgsql.sql (r1.61 -> r1.62)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/plpgsql.sql?r1=1.61&r2=1.62)
Added Files:
-----------
pgsql/doc/src/sgml/ref:
do.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/do.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-09-22 23:52:53 | pgsql: Unicode escapes in E'...' strings Author: Marko Kreen |
Previous Message | Bruce Momjian | 2009-09-22 20:16:52 | Re: pgsql: Define a new, more extensible syntax for COPY options. |