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

 <REFSYNOPSISDIV>
  <REFSYNOPSISDIVINFO>
   <DATE>1998-04-15</DATE>
  </REFSYNOPSISDIVINFO>
  <SYNOPSIS>
CLOSE <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
  </SYNOPSIS>
  
  <REFSECT2 ID="R2-SQL-CLOSE-1">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    Inputs
   </TITLE>
   <PARA>
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
     </TERM>
     <LISTITEM>
      <PARA>
       <VARIABLELIST>
	<VARLISTENTRY>
	 <TERM>
	  <ReturnValue>
	   <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
	  </ReturnValue>
	 </TERM>
	 <LISTITEM>
	  <PARA>
	   The name of an open cursor to close.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
       </variablelist>
     </LISTITEM>
    </VARLISTENTRY>
   </VARIABLELIST>
  </REFSECT2>
  
  <REFSECT2 ID="R2-SQL-CLOSE-2">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    Outputs
   </TITLE>
   <PARA>
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
     </TERM>
     <LISTITEM>
      <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.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
       </variablelist>
     </LISTITEM>
    </VARLISTENTRY>
   </VARIABLELIST>
   
  </REFSECT2>
 </REFSYNOPSISDIV>
 
 <REFSECT1 ID="R1-SQL-CLOSE-1">
  <REFSECT1INFO>
   <DATE>1998-04-15</DATE>
  </REFSECT1INFO>
  <TITLE>
   Description
  </TITLE>
  <PARA>
   CLOSE 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 COMMIT or ROLLBACK.
  </PARA>
  
  <REFSECT2 ID="R2-SQL-CLOSE-3">
   <REFSECT2INFO>
    <DATE>1998-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    Notes
   </TITLE>
   <PARA>
    PostgreSQL does not have an explicit OPEN cursor statement;
    a cursor is considered open when it is DECLAREd. 
    Use DECLARE 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-04-15</DATE>
   </REFSECT2INFO>
   <TITLE>
    SQL92
   </TITLE>
   <PARA>
    CLOSE is fully compatibile 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:
-->
