From 5d42c0f3acaaf6b21a64c0990c8f55c1c3e663f7 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 9 Jan 2001 15:26:16 +0000 Subject: [PATCH] A patch for doc/src/sgml/plsql.sgml to add a little more info about PL/pgSQL EXECUTE. -- -------- Robert B. Easter --- doc/src/sgml/plsql.sgml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/plsql.sgml b/doc/src/sgml/plsql.sgml index 12cd5de612..30097c8128 100644 --- a/doc/src/sgml/plsql.sgml +++ b/doc/src/sgml/plsql.sgml @@ -1,5 +1,5 @@ @@ -488,19 +488,29 @@ PERFORM query EXECUTE - query + query-string - + + + where query-string is a string + of type TEXT containing the query to be executed. + + Unlike all other queries in PL/pgSQL, a query run by an EXECUTE statement is not prepared and saved just once during the life of the server. Instead, the query is - prepared each time the statement is run. This allows the - query to be dynamically created + prepared each time the statement is run. The + query-string can be dynamically created within the procedure to perform actions on variable tables and fields. + + + The results from SELECT queries are discarded by EXECUTE unless + SELECT INTO is used to save the results into a table. + An example: -- 2.40.0