提交 5d42c0f3 编写于 作者: B Bruce Momjian

A patch for doc/src/sgml/plsql.sgml to add a little more info about PL/pgSQL

EXECUTE.

--
-------- Robert B. Easter
上级 df389d16
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.12 2001/01/06 12:26:08 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.13 2001/01/09 15:26:16 momjian Exp $
--> -->
<chapter id="plsql"> <chapter id="plsql">
...@@ -488,19 +488,29 @@ PERFORM <replaceable>query</replaceable> ...@@ -488,19 +488,29 @@ PERFORM <replaceable>query</replaceable>
<listitem> <listitem>
<cmdsynopsis> <cmdsynopsis>
<command>EXECUTE</command> <command>EXECUTE</command>
<arg choice="req"><replaceable class="command">query</replaceable></arg> <arg choice="req"><replaceable class="command">query-string</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
<para>
where <replaceable>query-string</replaceable> is a string
of type TEXT containing the <replaceable>query</replaceable> to be executed.
</para>
<para> <para>
Unlike all other queries in PL/pgSQL, a Unlike all other queries in PL/pgSQL, a
<replaceable>query</replaceable> run by an EXECUTE statement <replaceable>query</replaceable> run by an EXECUTE statement
is not prepared and saved just once during the life of the is not prepared and saved just once during the life of the
server. Instead, the <replaceable>query</replaceable> is server. Instead, the <replaceable>query</replaceable> is
prepared each time the statement is run. This allows the prepared each time the statement is run. The
<replaceable>query</replaceable> to be dynamically created <replaceable>query-string</replaceable> can be dynamically created
within the procedure to perform actions on variable tables and within the procedure to perform actions on variable tables and
fields. fields.
</para> </para>
<para>
The results from SELECT queries are discarded by EXECUTE unless
SELECT INTO is used to save the results into a table.
</para>
<para> <para>
An example: An example:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册