From 94bf47db8ffc13005d9b14ec3331f6db94a91d46 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 6 Sep 2011 13:41:30 -0400 Subject: [PATCH] Document PERFORM limitation when using WITH queries. Backpatch to 9.0 and 9.1. Report from depstein@alliedtesting.com. --- doc/src/sgml/plpgsql.sgml | 3 +++ 1 file changed, 3 insertions(+) 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 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 -- 2.40.0