summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-04-10 17:56:21 +0000
committerTom Lane2009-04-10 17:56:21 +0000
commit843c6546eb6f2e09f3543a24f9c875b2f6773ff0 (patch)
tree7c91b6cc775a4b17c3a9f3c67f972994c5b2d25c
parent51781146a8307c18f4ee74dbe8c780910f3287b9 (diff)
Add cross-references from the DECLARE and FETCH reference pages to
the plpgsql documentation about cursors. Per a suggestion from Matthew Wakeling.
-rw-r--r--doc/src/sgml/ref/declare.sgml11
-rw-r--r--doc/src/sgml/ref/fetch.sgml11
2 files changed, 20 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/declare.sgml b/doc/src/sgml/ref/declare.sgml
index 373ef39be7..641971149a 100644
--- a/doc/src/sgml/ref/declare.sgml
+++ b/doc/src/sgml/ref/declare.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/declare.sgml,v 1.45 2008/11/16 17:34:28 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/declare.sgml,v 1.46 2009/04/10 17:56:21 tgl Exp $
PostgreSQL documentation
-->
@@ -41,6 +41,15 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI
After the cursor is created, rows are fetched from it using
<xref linkend="sql-fetch" endterm="sql-fetch-title">.
</para>
+
+ <note>
+ <para>
+ This page describes usage of cursors at the SQL command level.
+ If you are trying to use cursors inside a <application>PL/pgSQL</>
+ function, the rules are different &mdash;
+ see <xref linkend="plpgsql-cursors">.
+ </para>
+ </note>
</refsect1>
<refsect1>
diff --git a/doc/src/sgml/ref/fetch.sgml b/doc/src/sgml/ref/fetch.sgml
index 0a9e6342e0..74ff297bb2 100644
--- a/doc/src/sgml/ref/fetch.sgml
+++ b/doc/src/sgml/ref/fetch.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/fetch.sgml,v 1.42 2008/11/14 10:22:47 petere Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/fetch.sgml,v 1.43 2009/04/10 17:56:21 tgl Exp $
PostgreSQL documentation
-->
@@ -92,6 +92,15 @@ where <replaceable class="PARAMETER">direction</replaceable> can be empty or one
row. This will succeed unless the cursor is positioned before the
first row or after the last row; in which case, no row is returned.
</para>
+
+ <note>
+ <para>
+ This page describes usage of cursors at the SQL command level.
+ If you are trying to use cursors inside a <application>PL/pgSQL</>
+ function, the rules are different &mdash;
+ see <xref linkend="plpgsql-cursors">.
+ </para>
+ </note>
</refsect1>
<refsect1>