1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Clarify what commands are not allowed in SQL functions.

This commit is contained in:
Bruce Momjian
2011-03-10 18:46:21 -05:00
parent 9d4625ad0b
commit 678a0d286c

View File

@ -116,9 +116,9 @@
Besides <command>SELECT</command> queries, the commands can include data Besides <command>SELECT</command> queries, the commands can include data
modification queries (<command>INSERT</command>, modification queries (<command>INSERT</command>,
<command>UPDATE</command>, and <command>DELETE</command>), as well as <command>UPDATE</command>, and <command>DELETE</command>), as well as
other SQL commands. (The only exception is that you cannot put other SQL commands. (You cannot put transaction commands, e.g.
<command>BEGIN</>, <command>COMMIT</>, <command>ROLLBACK</>, or <command>COMMIT</>, <command>SAVEPOINT</>, and some utility
<command>SAVEPOINT</> commands into a <acronym>SQL</acronym> function.) commands, e.g. <literal>VACUUM</>, into an <acronym>SQL</acronym> function.)
However, the final command However, the final command
must be a <command>SELECT</command> or have a <literal>RETURNING</> must be a <command>SELECT</command> or have a <literal>RETURNING</>
clause that returns whatever is clause that returns whatever is