postgresql/doc/src/sgml/ref/close.sgml

165 lines
3.3 KiB
Plaintext
Raw Normal View History

<REFENTRY ID="SQL-CLOSE">
1998-05-13 07:34:00 +02:00
<REFMETA>
<REFENTRYTITLE>
CLOSE
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
CLOSE
</REFNAME>
<REFPURPOSE>
Close a cursor
</REFPURPOSE>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
1998-09-16 16:43:12 +02:00
<DATE>1998-09-08</DATE>
1998-05-13 07:34:00 +02:00
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
CLOSE <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
</SYNOPSIS>
<REFSECT2 ID="R2-SQL-CLOSE-1">
<REFSECT2INFO>
1998-09-16 16:43:12 +02:00
<DATE>1998-09-08</DATE>
1998-05-13 07:34:00 +02:00
</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>
1998-09-16 16:43:12 +02:00
<DATE>1998-09-08</DATE>
1998-05-13 07:34:00 +02:00
</REFSECT2INFO>
<TITLE>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
1998-09-16 16:43:12 +02:00
<ReturnValue>CLOSE</ReturnValue>
1998-05-13 07:34:00 +02:00
</TERM>
<LISTITEM>
<PARA>
Message returned if the cursor is successfully closed.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
1998-09-16 16:43:12 +02:00
<ReturnValue>NOTICE PerformPortalClose: portal "<REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>" not found</ReturnValue>
1998-05-13 07:34:00 +02:00
</TERM>
<LISTITEM>
<PARA>
This warning is given if
<REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE> is not
declared or has already been closed.
1998-05-13 07:34:00 +02:00
</VARIABLELIST>
</REFSECT2>
</REFSYNOPSISDIV>
<REFSECT1 ID="R1-SQL-CLOSE-1">
<REFSECT1INFO>
1998-09-16 16:43:12 +02:00
<DATE>1998-09-08</DATE>
1998-05-13 07:34:00 +02:00
</REFSECT1INFO>
<TITLE>
Description
</TITLE>
<PARA>
1998-09-16 16:43:12 +02:00
<command>CLOSE</command> frees the resources associated with an open cursor.
1998-05-13 07:34:00 +02:00
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
1998-09-16 16:43:12 +02:00
transaction is terminated by <command>COMMIT</command>
or <command>ROLLBACK</command>.
1998-05-13 07:34:00 +02:00
</PARA>
<REFSECT2 ID="R2-SQL-CLOSE-3">
<REFSECT2INFO>
1998-09-16 16:43:12 +02:00
<DATE>1998-09-08</DATE>
1998-05-13 07:34:00 +02:00
</REFSECT2INFO>
<TITLE>
Notes
</TITLE>
<PARA>
1998-09-16 16:43:12 +02:00
<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.
1998-05-13 07:34:00 +02:00
</PARA>
</REFSECT2>
</refsect1>
<REFSECT1 ID="R1-SQL-CLOSE-2">
<TITLE>
Usage
</TITLE>
<PARA>
Close the cursor liahona:
</PARA>
<ProgramListing>
1998-09-16 16:43:12 +02:00
CLOSE liahona;
1998-05-13 07:34:00 +02:00
</ProgramListing>
</REFSECT1>
<REFSECT1 ID="R1-SQL-CLOSE-3">
<TITLE>
Compatibility
</TITLE>
<PARA>
</PARA>
<REFSECT2 ID="R2-SQL-CLOSE-4">
<REFSECT2INFO>
1998-09-16 16:43:12 +02:00
<DATE>1998-09-08</DATE>
1998-05-13 07:34:00 +02:00
</REFSECT2INFO>
<TITLE>
SQL92
</TITLE>
<PARA>
1998-09-16 16:43:12 +02:00
<command>CLOSE</command> is fully compatible with SQL92.
1998-05-13 07:34:00 +02:00
</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:
-->