2 $PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.22 2005/01/04 00:39:53 tgl Exp $
3 PostgreSQL documentation
6 <refentry id="SQL-CLOSE">
8 <refentrytitle id="SQL-CLOSE-TITLE">CLOSE</refentrytitle>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
13 <refname>CLOSE</refname>
14 <refpurpose>close a cursor</refpurpose>
17 <indexterm zone="sql-close">
18 <primary>CLOSE</primary>
21 <indexterm zone="sql-close">
22 <primary>cursor</primary>
23 <secondary>CLOSE</secondary>
28 CLOSE <replaceable class="PARAMETER">name</replaceable>
33 <title>Description</title>
36 <command>CLOSE</command> frees the resources associated with an open cursor.
37 After the cursor is closed, no subsequent operations
38 are allowed on it. A cursor should be closed when it is
43 Every non-holdable open cursor is implicitly closed when a
44 transaction is terminated by <command>COMMIT</command> or
45 <command>ROLLBACK</command>. A holdable cursor is implicitly
46 closed if the transaction that created it aborts via
47 <command>ROLLBACK</command>. If the creating transaction successfully
49 cursor remains open until an explicit <command>CLOSE</command> is
50 executed, or the client disconnects.
55 <title>Parameters</title>
59 <term><replaceable class="PARAMETER">name</replaceable></term>
62 The name of an open cursor to close.
73 <productname>PostgreSQL</productname> does not have an explicit
74 <command>OPEN</command> cursor statement; a cursor is considered
75 open when it is declared. Use the
76 <xref linkend="sql-declare" endterm="sql-declare-title">
77 statement to declare a cursor.
82 <title>Examples</title>
85 Close the cursor <literal>liahona</literal>:
93 <title>Compatibility</title>
96 <command>CLOSE</command> is fully conforming with the SQL standard.
101 <title>See Also</title>
103 <simplelist type="inline">
104 <member><xref linkend="sql-declare" endterm="sql-declare-title"></member>
105 <member><xref linkend="sql-fetch" endterm="sql-fetch-title"></member>
106 <member><xref linkend="sql-move" endterm="sql-move-title"></member>
111 <!-- Keep this comment at the end of the file
116 sgml-minimize-attributes:nil
117 sgml-always-quote-attributes:t
120 sgml-parent-document:nil
121 sgml-default-dtd-file:"../reference.ced"
122 sgml-exposed-tags:nil
123 sgml-local-catalogs:"/usr/lib/sgml/catalog"
124 sgml-local-ecat-files:nil