|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.46 2004/08/16 17:52:06 tgl Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.47 2004/09/24 18:54:14 tgl Exp $ |
3 | 3 | -->
|
4 | 4 |
|
5 | 5 | <chapter id="plpgsql">
|
@@ -1073,10 +1073,12 @@ END;
|
1073 | 1073 | PERFORM <replaceable>query</replaceable>;
|
1074 | 1074 | </synopsis>
|
1075 | 1075 |
|
1076 |
| - This executes <replaceable>query</replaceable>, which must be a |
1077 |
| - <command>SELECT</command> statement, and discards the |
1078 |
| - result. <application>PL/pgSQL</application> variables are |
1079 |
| - substituted in the query as usual. Also, the special variable |
| 1076 | + This executes <replaceable>query</replaceable> and discards the |
| 1077 | + result. Write the <replaceable>query</replaceable> the same |
| 1078 | + way as you would in an SQL <command>SELECT</> command, but replace the |
| 1079 | + initial keyword <command>SELECT</> with <command>PERFORM</command>. |
| 1080 | + <application>PL/pgSQL</application> variables will be |
| 1081 | + substituted into the query as usual. Also, the special variable |
1080 | 1082 | <literal>FOUND</literal> is set to true if the query produced at
|
1081 | 1083 | least one row or false if it produced no rows.
|
1082 | 1084 | </para>
|
|