1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2002-03-06 07:48:05 +01:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.11 2002/03/06 06:48:03 momjian Exp $
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refentry id="SQL-CLOSE">
|
|
|
|
<refmeta>
|
1999-07-22 17:09:15 +02:00
|
|
|
<refentrytitle id="SQL-CLOSE-TITLE">
|
1998-05-13 07:34:00 +02:00
|
|
|
CLOSE
|
1999-07-06 19:16:42 +02:00
|
|
|
</refentrytitle>
|
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>
|
1998-05-13 07:34:00 +02:00
|
|
|
CLOSE
|
1999-07-06 19:16:42 +02:00
|
|
|
</refname>
|
|
|
|
<refpurpose>
|
2001-09-03 14:57:50 +02:00
|
|
|
close a cursor
|
1999-07-06 19:16:42 +02:00
|
|
|
</refpurpose>
|
1998-12-29 03:24:47 +01:00
|
|
|
</refnamediv>
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsynopsisdiv>
|
|
|
|
<refsynopsisdivinfo>
|
1999-07-22 17:09:15 +02:00
|
|
|
<date>1999-07-20</date>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsynopsisdivinfo>
|
|
|
|
<synopsis>
|
|
|
|
CLOSE <replaceable class="PARAMETER">cursor</replaceable>
|
|
|
|
</synopsis>
|
1998-05-13 07:34:00 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsect2 id="R2-SQL-CLOSE-1">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-08</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
1998-05-13 07:34:00 +02:00
|
|
|
Inputs
|
1999-07-06 19:16:42 +02:00
|
|
|
</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>
|
1998-12-29 03:24:47 +01:00
|
|
|
</para>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsect2>
|
1998-05-13 07:34:00 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsect2 id="R2-SQL-CLOSE-2">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-08</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
1998-05-13 07:34:00 +02:00
|
|
|
Outputs
|
1999-07-06 19:16:42 +02:00
|
|
|
</title>
|
|
|
|
<para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><computeroutput>
|
|
|
|
CLOSE
|
|
|
|
</computeroutput></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Message returned if the cursor is successfully closed.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><computeroutput>
|
2002-03-06 07:48:05 +01:00
|
|
|
WARNING: PerformPortalClose: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found
|
1999-07-06 19:16:42 +02:00
|
|
|
</computeroutput></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
This warning is given if
|
|
|
|
<replaceable class="PARAMETER">cursor</replaceable> is not
|
|
|
|
declared or has already been closed.
|
1998-12-29 03:24:47 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
</variablelist>
|
1998-12-29 03:24:47 +01:00
|
|
|
</para>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsect2>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1 id="R1-SQL-CLOSE-1">
|
|
|
|
<refsect1info>
|
|
|
|
<date>1998-09-08</date>
|
|
|
|
</refsect1info>
|
|
|
|
<title>
|
1998-05-13 07:34:00 +02:00
|
|
|
Description
|
1999-07-06 19:16:42 +02:00
|
|
|
</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.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
1998-05-13 07:34:00 +02:00
|
|
|
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>.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
1998-05-13 07:34:00 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsect2 id="R2-SQL-CLOSE-3">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-08</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
1998-05-13 07:34:00 +02:00
|
|
|
Notes
|
1999-07-06 19:16:42 +02:00
|
|
|
</title>
|
|
|
|
<para>
|
2001-12-08 04:24:40 +01:00
|
|
|
<productname>PostgreSQL</productname> does not have
|
1999-07-06 19:16:42 +02:00
|
|
|
an explicit <command>OPEN</command> cursor statement;
|
1998-09-16 16:43:12 +02:00
|
|
|
a cursor is considered open when it is declared.
|
|
|
|
Use the <command>DECLARE</command> statement to declare a cursor.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
|
|
|
</refsect2>
|
1998-05-13 07:34:00 +02:00
|
|
|
</refsect1>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsect1 id="R1-SQL-CLOSE-2">
|
|
|
|
<title>
|
1998-05-13 07:34:00 +02:00
|
|
|
Usage
|
1999-07-06 19:16:42 +02:00
|
|
|
</title>
|
|
|
|
<para>
|
2002-01-20 23:19:57 +01:00
|
|
|
Close the cursor <literal>liahona</literal>:
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
|
|
|
<programlisting>
|
1998-09-16 16:43:12 +02:00
|
|
|
CLOSE liahona;
|
1999-07-06 19:16:42 +02:00
|
|
|
</programlisting>
|
|
|
|
</refsect1>
|
1998-05-13 07:34:00 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsect1 id="R1-SQL-CLOSE-3">
|
|
|
|
<title>
|
1998-05-13 07:34:00 +02:00
|
|
|
Compatibility
|
1999-07-06 19:16:42 +02:00
|
|
|
</title>
|
1998-05-13 07:34:00 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsect2 id="R2-SQL-CLOSE-4">
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-08</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
1998-05-13 07:34:00 +02:00
|
|
|
SQL92
|
1999-07-06 19:16:42 +02:00
|
|
|
</title>
|
|
|
|
<para>
|
1998-09-16 16:43:12 +02:00
|
|
|
<command>CLOSE</command> is fully compatible with SQL92.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
1998-05-13 07:34:00 +02:00
|
|
|
</refsect2>
|
|
|
|
</refsect1>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refentry>
|
1998-05-13 07:34:00 +02:00
|
|
|
|
|
|
|
<!-- 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:
|
|
|
|
-->
|