Skip to content

Commit dcc728e

Browse files
committed
Document PERFORM limitation when using WITH queries.
Backpatch to 9.0 and 9.1. Report from depstein@alliedtesting.com.
1 parent 0154332 commit dcc728e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/src/sgml/plpgsql.sgml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,9 @@ PERFORM <replaceable>query</replaceable>;
845845
result. Write the <replaceable>query</replaceable> the same
846846
way you would write an SQL <command>SELECT</> command, but replace the
847847
initial keyword <command>SELECT</> with <command>PERFORM</command>.
848+
For <keyword>WITH</> queries, use <keyword>PERFORM</> and then
849+
place the query in parentheses. (In this case, the query can only
850+
return one row.)
848851
<application>PL/pgSQL</application> variables will be
849852
substituted into the query just as for commands that return no result,
850853
and the plan is cached in the same way. Also, the special variable

0 commit comments

Comments
 (0)