]> granicus.if.org Git - postgresql/commitdiff
Document PERFORM limitation when using WITH queries.
authorBruce Momjian <bruce@momjian.us>
Tue, 6 Sep 2011 17:41:30 +0000 (13:41 -0400)
committerBruce Momjian <bruce@momjian.us>
Tue, 6 Sep 2011 17:42:04 +0000 (13:42 -0400)
Backpatch to 9.0 and 9.1.

Report from depstein@alliedtesting.com.

doc/src/sgml/plpgsql.sgml

index 20bc99108362486bc5a1d48ef7878dda6538a200..76fa78c8eca18a5d439d4f98e7ce987d1a6aff22 100644 (file)
@@ -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