summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-09-06 13:41:30 -0400
committerBruce Momjian <bruce@momjian.us>2011-09-06 13:42:04 -0400
commit94bf47db8ffc13005d9b14ec3331f6db94a91d46 (patch)
tree24adcada4cc8543cb76d707f67fcb63c2f28aa59
parenta3850a5f7582ebe328d2506873e31aac2b01d51b (diff)
downloadpostgresql-94bf47db8ffc13005d9b14ec3331f6db94a91d46.tar.gz
Document PERFORM limitation when using WITH queries.
Backpatch to 9.0 and 9.1. Report from depstein@alliedtesting.com.
-rw-r--r--doc/src/sgml/plpgsql.sgml3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 20bc991083..76fa78c8ec 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -940,6 +940,9 @@ PERFORM <replaceable>query</replaceable>;
result. Write the <replaceable>query</replaceable> the same
way you would write an SQL <command>SELECT</> command, but replace the
initial keyword <command>SELECT</> with <command>PERFORM</command>.
+ For <keyword>WITH</> queries, use <keyword>PERFORM</> and then
+ place the query in parentheses. (In this case, the query can only
+ return one row.)
<application>PL/pgSQL</application> variables will be
substituted into the query just as for commands that return no result,
and the plan is cached in the same way. Also, the special variable