diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2010-01-22 15:45:15 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2010-01-22 15:45:15 +0000 |
commit | adb77640304a375883eaaec9eb9b21036c2be0bd (patch) | |
tree | 3f143de99489c23d970af045ee73596f3d17e4bf /doc/src | |
parent | 306a4287c3503bdd3c3e490d80508e00e1708c02 (diff) | |
download | postgresql-adb77640304a375883eaaec9eb9b21036c2be0bd.tar.gz postgresql-adb77640304a375883eaaec9eb9b21036c2be0bd.zip |
PL/Python DO handler
Also cleaned up some redundancies between the primary error messages and the
error context in PL/Python.
Hannu Valtonen
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/plpython.sgml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index a623f3509bd..384b7aecc48 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/plpython.sgml,v 1.43 2009/12/19 22:23:21 petere Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/plpython.sgml,v 1.44 2010/01/22 15:45:15 petere Exp $ --> <chapter id="plpython"> <title>PL/Python - Python Procedural Language</title> @@ -551,6 +551,24 @@ $$ LANGUAGE plpythonu; </para> </sect1> + <sect1 id="plpython-do"> + <title>Anonymous Code Blocks</title> + + <para> + PL/Python also supports anonymous code blocks called with the + <xref linkend="sql-do"> statement: + +<programlisting> +DO $$ + # PL/Python code +$$ LANGUAGE plpythonu; +</programlisting> + + An anonymous code block receives no arguments, and whatever value it + might return is discarded. Otherwise it behaves just like a function. + </para> + </sect1> + <sect1 id="plpython-trigger"> <title>Trigger Functions</title> |