diff options
Diffstat (limited to 'doc/src/sgml/plpython.sgml')
-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> |