<module-body> ::=
<psql-module-body> | <external-module-body>
<psql-module-body> ::=
AS
[<forward-declarations>]
[<declarations>]
BEGIN
[<PSQL_statements>]
END
<external-module-body> ::=
EXTERNAL [NAME <extname>] ENGINE engine
[AS '<extbody>']
<forward-declarations> ::=
<forward-declare-item> [<forward-declare-item> ...]
<declarations> ::=
<declare-item> [<declare-item> ...]
<forward-declare-item> ::=
<subfunc-forward>
| <subproc-forward>
<declare-item> ::=
<declare-var>
| <declare-cursor>
| <subfunc-def>
| <subproc-def>
<extname> ::=
'<module-name>!<routine-name>[!<misc-info>]'
<declare-var> ::=
!! See DECLARE VARIABLE !!
<declare-cursor> ::=
!! See DECLARE .. CURSOR !!
<subfunc-forward>, <subfunc-def> ::=
!! See DECLARE FUNCTION !!
<subproc-forward>, <subproc-def> ::=
!! See DECLARE PROCEDURE !!