From: Bruce Momjian Date: Tue, 6 Sep 2011 17:41:32 +0000 (-0400) Subject: Document PERFORM limitation when using WITH queries. X-Git-Tag: REL9_0_5~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dcc728eef49bc0dbe2f88f9a56bda007afc9f46e;p=thirdparty%2Fpostgresql.git Document PERFORM limitation when using WITH queries. Backpatch to 9.0 and 9.1. Report from depstein@alliedtesting.com. --- diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 82e7675c271..8049a6c03af 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -845,6 +845,9 @@ PERFORM query; result. Write the query the same way you would write an SQL SELECT command, but replace the initial keyword SELECT with PERFORM. + For WITH queries, use PERFORM and then + place the query in parentheses. (In this case, the query can only + return one row.) PL/pgSQL 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