Add cross-references from the DECLARE and FETCH reference pages to
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Apr 2009 17:56:21 +0000 (17:56 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Apr 2009 17:56:21 +0000 (17:56 +0000)
the plpgsql documentation about cursors.  Per a suggestion from
Matthew Wakeling.

doc/src/sgml/ref/declare.sgml
doc/src/sgml/ref/fetch.sgml

index 481aa4316aad2e864250550f3824db536344f785..96e1f7d272b76e528f8f570fc1673e4fe6c5f497 100644 (file)
@@ -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>
index 7e69f81a97f60fef3a0f356aa37b26967b5b4567..ac392cbe8864b38d2e8b90eb2279790a91d80095 100644 (file)
@@ -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>