<REFENTRY ID="SQL-CLOSE">
 <REFMETA>
  <REFENTRYTITLE>
   CLOSE
  </REFENTRYTITLE>
  <REFMISCINFO>SQL - Language Statements</REFMISCINFO>
 </REFMETA>
 <REFNAMEDIV>
  <REFNAME>
   CLOSE
  </REFNAME>
  <REFPURPOSE>
   Close a cursor
  </REFPURPOSE>

 <REFSYNOPSISDIV>
  <REFSYNOPSISDIVINFO>
   <DATE>1998-09-08</DATE>
  </REFSYNOPSISDIVINFO>
  <SYNOPSIS>
CLOSE <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
  </SYNOPSIS>
  
  <REFSECT2 ID="R2-SQL-CLOSE-1">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
    Inputs
   </TITLE>
   <PARA>
       <VARIABLELIST>
	<VARLISTENTRY>
	 <TERM>
	   <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
	 </TERM>
	 <LISTITEM>
	  <PARA>
	   The name of an open cursor to close.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
       </variablelist>
  </REFSECT2>
  
  <REFSECT2 ID="R2-SQL-CLOSE-2">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
    Outputs
   </TITLE>
   <PARA>
       <VARIABLELIST>
	<VARLISTENTRY>
	 <TERM>
<ReturnValue>CLOSE</ReturnValue>
	 </TERM>
	 <LISTITEM>
	  <PARA>
	   Message returned if the cursor is successfully closed.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
	<VARLISTENTRY>
	 <TERM>
<ReturnValue>NOTICE PerformPortalClose: portal "<REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>" not found</ReturnValue>
	 </TERM>
	 <LISTITEM>
	  <PARA>
	   This warning is given if
	   <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE> is not
	   declared or has already been closed.

   </VARIABLELIST>
   
  </REFSECT2>
 </REFSYNOPSISDIV>
 
 <REFSECT1 ID="R1-SQL-CLOSE-1">
  <REFSECT1INFO>
   <DATE>1998-09-08</DATE>
  </REFSECT1INFO>
  <TITLE>
   Description
  </TITLE>
  <PARA>
   <command>CLOSE</command> frees the resources associated with an open cursor.
   After the cursor is closed, no subsequent operations
   are allowed on it. A cursor should be closed when it is
   no longer needed.
  </PARA>
  <PARA>
   An implicit close is executed for every open cursor when a
   transaction is terminated by <command>COMMIT</command>
 or <command>ROLLBACK</command>.
  </PARA>
  
  <REFSECT2 ID="R2-SQL-CLOSE-3">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
    Notes
   </TITLE>
   <PARA>
<productname>Postgres</productname> does not have
 an explicit <command>OPEN</command> cursor statement;
    a cursor is considered open when it is declared.
    Use the <command>DECLARE</command> statement to declare a cursor.
   </PARA>
  </REFSECT2>
 </refsect1>

 <REFSECT1 ID="R1-SQL-CLOSE-2">
  <TITLE>
   Usage
  </TITLE>
  <PARA>
   Close the cursor liahona:
  </PARA>
  <ProgramListing>
CLOSE liahona;
  </ProgramListing>
 </REFSECT1>
 
 <REFSECT1 ID="R1-SQL-CLOSE-3">
  <TITLE>
   Compatibility
  </TITLE>
  <PARA>
  </PARA>
  
  <REFSECT2 ID="R2-SQL-CLOSE-4">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
    SQL92
   </TITLE>
   <PARA>
    <command>CLOSE</command> is fully compatible with SQL92.
   </PARA>
  </refsect2>
 </refsect1>
</REFENTRY>


<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
