バージョンごとのドキュメント一覧

46.4. 匿名コードブロック #

<title>Anonymous Code Blocks</title>

PL/Python also supports anonymous code blocks called with the <xref linkend="sql-do"/> statement: PL/PythonはDO文で呼び出される匿名コードブロックもサポートします。

DO $$
    # PL/Python code
$$ LANGUAGE plpython3u;

An anonymous code block receives no arguments, and whatever value it might return is discarded. Otherwise it behaves just like a function. 匿名コードブロックは引数を持たず、また、何か値を返したとしても破棄されます。 その他は関数とまったく同様に動作します。