1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

PL/Python DO handler

Also cleaned up some redundancies between the primary error messages and the
error context in PL/Python.

Hannu Valtonen
This commit is contained in:
Peter Eisentraut
2010-01-22 15:45:15 +00:00
parent 306a4287c3
commit adb7764030
8 changed files with 102 additions and 16 deletions

View File

@ -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>