head	1.29;
access;
symbols
	REL9_0_0:1.29
	REL9_1_ALPHA1:1.29
	REL9_0_RC1:1.29
	REL9_0_BETA4:1.29
	REL9_0_STABLE:1.29.0.2
	REL9_0_BETA3:1.29
	REL9_0_BETA2:1.29
	REL7_4_29:1.19
	REL8_0_25:1.22
	REL8_1_21:1.22
	REL8_2_17:1.24
	REL8_3_11:1.26
	REL8_4_4:1.28
	REL9_0_BETA1:1.29
	REL9_0_ALPHA5_BRANCH:1.28.0.12
	REL9_0_ALPHA5:1.28
	REL7_4_28:1.19
	REL8_0_24:1.22
	REL8_1_20:1.22
	REL8_2_16:1.24
	REL8_3_10:1.26
	REL8_4_3:1.28
	REL9_0_ALPHA4:1.28
	REL9_0_ALPHA4_BRANCH:1.28.0.10
	REL8_5_ALPHA3:1.28
	REL8_5_ALPHA3_BRANCH:1.28.0.8
	REL7_4_27:1.19
	REL8_0_23:1.22
	REL8_1_19:1.22
	REL8_2_15:1.24
	REL8_3_9:1.26
	REL8_4_2:1.28
	REL8_5_ALPHA2:1.28
	REL8_5_ALPHA2_BRANCH:1.28.0.6
	REL7_4_26:1.19
	REL8_0_22:1.22
	REL8_1_18:1.22
	REL8_2_14:1.24
	REL8_3_8:1.26
	REL8_4_1:1.28
	REL8_5_ALPHA1:1.28
	REL8_5_ALPHA1_BRANCH:1.28.0.4
	REL8_4_STABLE:1.28.0.2
	REL8_4_0:1.28
	REL8_4_RC2:1.28
	REL8_4_RC1:1.28
	REL8_4_BETA2:1.28
	REL8_4_BETA1:1.28
	REL7_4_25:1.19
	REL8_0_21:1.22
	REL8_1_17:1.22
	REL8_2_13:1.24
	REL8_3_7:1.26
	REL7_4_24:1.19
	REL8_0_20:1.22
	REL8_1_16:1.22
	REL8_2_12:1.24
	REL8_3_6:1.26
	REL7_4_23:1.19
	REL8_0_19:1.22
	REL8_1_15:1.22
	REL8_2_11:1.24
	REL8_3_5:1.26
	REL7_4_22:1.19
	REL8_0_18:1.22
	REL8_1_14:1.22
	REL8_2_10:1.24
	REL8_3_4:1.26
	REL7_4_21:1.19
	REL8_0_17:1.22
	REL8_1_13:1.22
	REL8_2_9:1.24
	REL8_3_3:1.26
	REL7_4_20:1.19
	REL8_0_16:1.22
	REL8_1_12:1.22
	REL8_2_8:1.24
	REL8_3_2:1.26
	REL8_2_7:1.24
	REL8_3_1:1.26
	REL8_3_STABLE:1.26.0.2
	REL8_3_0:1.26
	REL8_3_RC2:1.26
	REL7_3_21:1.13
	REL7_4_19:1.19
	REL8_0_15:1.22
	REL8_1_11:1.22
	REL8_2_6:1.24
	REL8_3_RC1:1.26
	REL8_3_BETA4:1.26
	REL8_3_BETA3:1.26
	REL8_3_BETA2:1.26
	REL8_3_BETA1:1.26
	REL7_3_20:1.13
	REL7_4_18:1.19
	REL8_0_14:1.22
	REL8_1_10:1.22
	REL8_2_5:1.24
	REL7_3_19:1.13
	REL7_4_17:1.19
	REL8_0_13:1.22
	REL8_1_9:1.22
	REL8_2_4:1.24
	REL8_0_12:1.22
	REL8_1_8:1.22
	REL8_2_3:1.24
	REL7_3_18:1.13
	REL7_4_16:1.19
	REL8_0_11:1.22
	REL8_1_7:1.22
	REL8_2_2:1.24
	REL8_0_10:1.22
	REL8_1_6:1.22
	REL8_2_1:1.24
	REL7_4_15:1.19
	REL7_3_17:1.13
	REL8_2_STABLE:1.24.0.2
	REL8_2_0:1.24
	REL8_2_RC1:1.24
	REL8_2_BETA3:1.24
	REL8_2_BETA2:1.24
	REL8_1_5:1.22
	REL8_0_9:1.22
	REL7_4_14:1.19
	REL7_3_16:1.13
	REL8_2_BETA1:1.24
	REL7_3_15:1.13
	REL7_4_13:1.19
	REL8_0_8:1.22
	REL8_1_4:1.22
	REL7_3_14:1.13
	REL7_4_12:1.19
	REL8_0_7:1.22
	REL8_1_3:1.22
	REL7_3_13:1.13
	REL7_4_11:1.19
	REL8_0_6:1.22
	REL8_1_2:1.22
	REL7_3_12:1.13
	REL7_4_10:1.19
	REL8_0_5:1.22
	REL8_1_1:1.22
	REL8_1_STABLE:1.22.0.6
	REL8_1_0:1.22
	REL8_1_0RC1:1.22
	REL8_1_0BETA4:1.22
	REL8_1_0BETA3:1.22
	REL7_3_11:1.13
	REL7_4_9:1.19
	REL8_0_4:1.22
	REL8_1_0BETA2:1.22
	REL8_1_0BETA1:1.22
	REL7_2_8:1.10
	REL7_3_10:1.13
	REL7_4_8:1.19
	REL8_0_3:1.22
	REL8_0_2:1.22
	REL7_2_7:1.10
	REL7_3_9:1.13
	REL7_4_7:1.19
	REL8_0_1:1.22
	REL8_0_STABLE:1.22.0.4
	REL8_0_0:1.22.0.2
	REL8_0_0RC5:1.22
	REL8_0_0RC4:1.22
	REL8_0_0RC3:1.21
	REL8_0_0RC2:1.21
	REL8_0_0RC1:1.21
	REL8_0_0BETA5:1.21
	REL8_0_0BETA4:1.21
	REL7_4_6:1.19
	REL7_3_8:1.13
	REL7_2_6:1.10
	REL8_0_0BETA3:1.21
	REL8_0_0BETA2:1.21
	REL7_2_5:1.10
	REL7_4_5:1.19
	REL7_3_7:1.13
	REL7_4_4:1.19
	REL8_0_0BETA1:1.21
	REL7_4_3:1.19
	REL7_4_2:1.19
	REL7_3_6:1.13
	REL7_4_1:1.19
	REL7_3_5:1.13
	REL7_4:1.19
	REL7_4_RC2:1.19
	REL7_4_STABLE:1.19.0.2
	REL7_4_RC1:1.19
	REL7_4_BETA5:1.19
	REL7_4_BETA4:1.19
	REL7_4_BETA3:1.18
	REL7_4_BETA2:1.16
	WIN32_DEV:1.14.0.2
	REL7_4_BETA1:1.14
	REL7_3_4:1.13
	REL7_3_2:1.13
	REL7_2_4:1.10
	REL7_3_STABLE:1.13.0.2
	REL7_2_3:1.10
	REL7_2_STABLE:1.10.0.2
	REL7_2:1.10
	REL7_2_RC2:1.10
	REL7_2_RC1:1.10
	REL7_2_BETA5:1.9
	REL7_2_BETA4:1.9
	REL7_2_BETA3:1.8
	REL7_2_BETA2:1.8
	REL7_2_BETA1:1.8
	REL7_1_2:1.7
	REL7_1_STABLE:1.7.0.4
	REL7_1_BETA:1.7
	REL7_1_BETA3:1.7
	REL7_1_BETA2:1.7
	REL7_1:1.7
	REL7_0_PATCHES:1.7.0.2
	REL7_0:1.7
	REL6_5_PATCHES:1.6.0.2
	REL6_5:1.6
	REL6_4:1.4.0.2;
locks; strict;
comment	@# @;


1.29
date	2010.04.03.07.22.57;	author petere;	state Exp;
branches;
next	1.28;

1.28
date	2008.11.14.10.22.45;	author petere;	state Exp;
branches;
next	1.27;

1.27
date	2008.05.12.16.23.26;	author alvherre;	state Exp;
branches;
next	1.26;

1.26
date	2007.05.15.19.13.55;	author neilc;	state Exp;
branches;
next	1.25;

1.25
date	2007.04.12.06.53.45;	author neilc;	state Exp;
branches;
next	1.24;

1.24
date	2006.09.16.00.30.17;	author momjian;	state Exp;
branches;
next	1.23;

1.23
date	2006.01.18.06.49.26;	author neilc;	state Exp;
branches;
next	1.22;

1.22
date	2005.01.04.00.39.53;	author tgl;	state Exp;
branches;
next	1.21;

1.21
date	2004.06.17.12.41.02;	author momjian;	state Exp;
branches;
next	1.20;

1.20
date	2003.11.29.19.51.38;	author pgsql;	state Exp;
branches;
next	1.19;

1.19
date	2003.09.22.00.16.57;	author petere;	state Exp;
branches;
next	1.18;

1.18
date	2003.09.09.18.28.52;	author tgl;	state Exp;
branches;
next	1.17;

1.17
date	2003.08.31.17.32.21;	author petere;	state Exp;
branches;
next	1.16;

1.16
date	2003.08.24.21.02.42;	author petere;	state Exp;
branches;
next	1.15;

1.15
date	2003.08.17.04.46.00;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	2003.04.15.13.25.08;	author petere;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2002.05.18.15.44.47;	author petere;	state Exp;
branches;
next	1.12;

1.12
date	2002.04.21.19.02.39;	author thomas;	state Exp;
branches;
next	1.11;

1.11
date	2002.03.06.06.48.03;	author momjian;	state Exp;
branches;
next	1.10;

1.10
date	2002.01.20.22.19.56;	author petere;	state Exp;
branches;
next	1.9;

1.9
date	2001.12.08.03.24.34;	author thomas;	state Exp;
branches;
next	1.8;

1.8
date	2001.09.03.12.57.49;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	99.07.22.15.09.06;	author thomas;	state Exp;
branches;
next	1.6;

1.6
date	99.07.06.17.16.34;	author thomas;	state Exp;
branches;
next	1.5;

1.5
date	98.12.29.02.24.33;	author thomas;	state Exp;
branches;
next	1.4;

1.4
date	98.10.30.19.33.35;	author thomas;	state Exp;
branches;
next	1.3;

1.3
date	98.09.16.14.42.55;	author thomas;	state Exp;
branches;
next	1.2;

1.2
date	98.09.07.15.58.02;	author thomas;	state Exp;
branches;
next	1.1;

1.1
date	98.05.13.05.33.58;	author thomas;	state Exp;
branches;
next	;

1.14.2.1
date	2003.09.07.04.36.44;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.29
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.28 2008/11/14 10:22:45 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-CLOSE">
 <refmeta>
  <refentrytitle>CLOSE</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>CLOSE</refname>
  <refpurpose>close a cursor</refpurpose>
 </refnamediv>

 <indexterm zone="sql-close">
  <primary>CLOSE</primary>
 </indexterm>

 <indexterm zone="sql-close">
  <primary>cursor</primary>
  <secondary>CLOSE</secondary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
CLOSE { <replaceable class="PARAMETER">name</replaceable> | ALL }
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <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>
   Every non-holdable open cursor is implicitly closed when a
   transaction is terminated by <command>COMMIT</command> or
   <command>ROLLBACK</command>.  A holdable cursor is implicitly
   closed if the transaction that created it aborts via
   <command>ROLLBACK</command>.  If the creating transaction
   successfully commits, the holdable cursor remains open until an
   explicit <command>CLOSE</command> is executed, or the client
   disconnects.
  </para>
 </refsect1>
  
 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><replaceable class="PARAMETER">name</replaceable></term>
    <listitem>
     <para>
      The name of an open cursor to close.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>ALL</literal></term>
    <listitem>
     <para>
      Close all open cursors.
     </para>
    </listitem>
   </varlistentry>

  </variablelist>
 </refsect1>

 <refsect1>
  <title>Notes</title>

  <para>
   <productname>PostgreSQL</productname> does not have an explicit
   <command>OPEN</command> cursor statement; a cursor is considered
   open when it is declared.  Use the
   <xref linkend="sql-declare">
   statement to declare a cursor.
  </para>

  <para>
   You can see all available cursors by querying the <link
   linkend="view-pg-cursors"><structname>pg_cursors</></> system view.
  </para>

  <para>
   If a cursor is closed after a savepoint which is later rolled back,
   the <command>CLOSE</command> is not rolled back; that is, the cursor
   remains closed.
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   Close the cursor <literal>liahona</literal>:
<programlisting>
CLOSE liahona;
</programlisting>
  </para>
 </refsect1>
 
 <refsect1>
  <title>Compatibility</title>
  
  <para>
   <command>CLOSE</command> is fully conforming with the SQL
   standard. <command>CLOSE ALL</> is a <productname>PostgreSQL</>
   extension.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-declare"></member>
   <member><xref linkend="sql-fetch"></member>
   <member><xref linkend="sql-move"></member>
  </simplelist>
 </refsect1>
</refentry>
@


1.28
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.27 2008/05/12 16:23:26 alvherre Exp $
d8 1
a8 1
  <refentrytitle id="SQL-CLOSE-TITLE">CLOSE</refentrytitle>
d87 1
a87 1
   <xref linkend="sql-declare" endterm="sql-declare-title">
d128 3
a130 3
   <member><xref linkend="sql-declare" endterm="sql-declare-title"></member>
   <member><xref linkend="sql-fetch" endterm="sql-fetch-title"></member>
   <member><xref linkend="sql-move" endterm="sql-move-title"></member>
@


1.27
log
@Document that "ROLLBACK TO savepoint" does not un-close cursors.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.26 2007/05/15 19:13:55 neilc Exp $
d9 1
@


1.26
log
@Various fixes for the SGML docs. Consistently use spaces before/after
parentheses in syntax descriptions. Consistently use the present tense
when describing the basic purpose of each "DROP" command. Add a few
more hyperlinks.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.25 2007/04/12 06:53:45 neilc Exp $
d94 6
@


1.25
log
@RESET SESSION, plus related new DDL commands. Patch from Marko Kreen,
reviewed by Neil Conway. This patch adds the following DDL command
variants: RESET SESSION, RESET TEMP, RESET PLANS, CLOSE ALL, and
DEALLOCATE ALL. RESET SESSION is intended for use by connection
pool software and the like, in order to reset a client session
to something close to its initial state.

Note that while most of these command variants can be executed
inside a transaction block (but are not transaction-aware!),
RESET SESSION cannot. While this is inconsistent, it is intended
to catch programmer mistakes: RESET SESSION in an open transaction
block is probably unintended.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.24 2006/09/16 00:30:17 momjian Exp $
d91 2
a92 2
   You can see all available cursors by querying the
   <structname>pg_cursors</structname> system view.
@


1.24
log
@Remove emacs info from footer of SGML files.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.23 2006/01/18 06:49:26 neilc Exp $
d28 1
a28 1
CLOSE <replaceable class="PARAMETER">name</replaceable>
d47 4
a50 4
   <command>ROLLBACK</command>.  If the creating transaction successfully
   commits, the holdable
   cursor remains open until an explicit <command>CLOSE</command> is
   executed, or the client disconnects.
d66 10
d111 3
a113 1
   <command>CLOSE</command> is fully conforming with the SQL standard.
@


1.23
log
@Add a new system view, pg_cursors, that displays the currently available
cursors. Patch from Joachim Wieland, review and ediorialization by Neil
Conway. The view lists cursors defined by DECLARE CURSOR, using SPI, or
via the Bind message of the frontend/backend protocol. This means the
view does not list the unnamed portal or the portal created to implement
EXECUTE. Because we do list SPI portals, there might be more rows in
this view than you might expect if you are using SPI implicitly (e.g.
via a procedural language).

Per recent discussion on -hackers, the query string included in the
view for cursors defined by DECLARE CURSOR is based on
debug_query_string. That means it is not accurate if multiple queries
separated by semicolons are submitted as one query string. However,
there doesn't seem a trivial fix for that: debug_query_string
is better than nothing. I also changed SPI_cursor_open() to include
the source text for the portal it creates: AFAICS there is no reason
not to do this.

Update the documentation and regression tests, bump the catversion.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.22 2005/01/04 00:39:53 tgl Exp $
a114 17

<!-- 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:
-->
@


1.22
log
@More minor updates and copy-editing.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/close.sgml,v 1.21 2004/06/17 12:41:02 momjian Exp $
d79 5
@


1.21
log
@The attached patch adds some index entries pointing to the cursor
reference pages.  Please apply.

Alvaro Herrera
@
text
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/close.sgml,v 1.20 2003/11/29 19:51:38 pgsql Exp $
d75 2
a76 1
   open when it is declared.  Use the <command>DECLARE</command>
d99 10
@


1.20
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d2 1
a2 1
$PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.19 2003/09/22 00:16:57 petere Exp $
d19 5
@


1.19
log
@Make the SQL command synopses appear less random.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.18 2003/09/09 18:28:52 tgl Exp $
@


1.18
log
@Remove a bunch of content-free Diagnostics sections, as per previous
discussion.  (Still have some work to do editing the remainder.)
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.17 2003/08/31 17:32:21 petere Exp $
d23 1
a23 1
CLOSE <replaceable class="PARAMETER">cursor</replaceable>
d54 1
a54 1
    <term><replaceable class="PARAMETER">cursor</replaceable></term>
@


1.17
log
@Add/edit index entries.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.16 2003/08/24 21:02:42 petere Exp $
d40 4
a43 3
   <command>ROLLBACK</command>. Holdable cursors are implicitely
   closed if the transaction that created them aborts via
   <command>ROLLBACK</command>; if this does not happen, the holdable
a57 26
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
  
 <refsect1>
  <title>Diagnostics</title>

  <variablelist>
   <varlistentry>
    <term><computeroutput>CLOSE CURSOR</computeroutput></term>
    <listitem>
     <para>
      Message returned if the cursor is successfully closed.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><computeroutput>ERROR:  cursor "<replaceable class="PARAMETER">cursor</replaceable>" does not exist</computeroutput></term>
    <listitem>
     <para>
      Message returned if <replaceable
      class="PARAMETER">cursor</replaceable> is not declared or has
      already been closed.
@


1.16
log
@Change warnings for non-existing or pre-existing cursors to errors.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.15 2003/08/17 04:46:00 momjian Exp $
d16 4
@


1.15
log
@There is a misstatement in the CLOSE reference page, now that we
have cursors that might outlive their creating transactions. A
patch is attached that fixes this (suggestions on better wording
are welcome).

Neil Conway
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.14 2003/04/15 13:25:08 petere Exp $
d73 1
a73 1
    <term><computeroutput>WARNING:  PerformPortalClose: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found</computeroutput></term>
d76 1
a76 1
      This warning is given if <replaceable
@


1.14
log
@Bring SQL ref pages to consistent format, part 1.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.13 2002/05/18 15:44:47 petere Exp $
d34 7
a40 3
   Every open cursor is implicitly closed when a transaction is
   terminated by <command>COMMIT</command> or
   <command>ROLLBACK</command>.
@


1.14.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/close.sgml,v 1.17 2003/08/31 17:32:21 petere Exp $
a16 4
 <indexterm zone="sql-close">
  <primary>CLOSE</primary>
 </indexterm>

d34 3
a36 7
   Every non-holdable open cursor is implicitly closed when a
   transaction is terminated by <command>COMMIT</command> or
   <command>ROLLBACK</command>. Holdable cursors are implicitely
   closed if the transaction that created them aborts via
   <command>ROLLBACK</command>; if this does not happen, the holdable
   cursor remains open until an explicit <command>CLOSE</command> is
   executed, or the client disconnects.
d69 1
a69 1
    <term><computeroutput>ERROR:  cursor "<replaceable class="PARAMETER">cursor</replaceable>" does not exist</computeroutput></term>
d72 1
a72 1
      Message returned if <replaceable
@


1.13
log
@Revise command completion tags as per hackers message on 20 March.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.12 2002/04/21 19:02:39 thomas Exp $
d11 1
d13 2
a14 6
  <refname>
   CLOSE
  </refname>
  <refpurpose>
   close a cursor
  </refpurpose>
d16 1
d18 1
a18 4
  <refsynopsisdivinfo>
   <date>1999-07-20</date>
  </refsynopsisdivinfo>
  <synopsis>
d20 1
a20 59
  </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>
   </para>
  </refsect2>
  
  <refsect2 id="R2-SQL-CLOSE-2">
   <refsect2info>
    <date>1998-09-08</date>
   </refsect2info>
   <title>
    Outputs
   </title>
   <para>

    <variablelist>
     <varlistentry>
      <term><computeroutput>
CLOSE CURSOR
       </computeroutput></term>
      <listitem>
       <para>
	Message returned if the cursor is successfully closed.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><computeroutput>
WARNING:  PerformPortalClose: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found
       </computeroutput></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>
   </para>
  </refsect2>
d23 3
a25 7
 <refsect1 id="R1-SQL-CLOSE-1">
  <refsect1info>
   <date>1998-09-08</date>
  </refsect1info>
  <title>
   Description
  </title>
d32 1
d34 3
a36 3
   An implicit close is executed for every open cursor when a
   transaction is terminated by <command>COMMIT</command>
 or <command>ROLLBACK</command>.
d38 1
d40 39
a78 14
  <refsect2 id="R2-SQL-CLOSE-3">
   <refsect2info>
    <date>1998-09-08</date>
   </refsect2info>
   <title>
    Notes
   </title>
   <para>
    <productname>PostgreSQL</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>
d81 14
a94 4
 <refsect1 id="R1-SQL-CLOSE-2">
  <title>
   Usage
  </title>
d97 3
a100 3
  <programlisting>
CLOSE liahona;
  </programlisting>
d103 2
a104 4
 <refsect1 id="R1-SQL-CLOSE-3">
  <title>
   Compatibility
  </title>
d106 3
a108 11
  <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>
@


1.12
log
@Augment the date/time examples in the User's Guide to reflect the newer
 capabilities of specifying time zones as intervals per SQL9x.
Put refentrytitle contents on the same line as the tag.
 Otherwise, leading whitespace is propagated into the product, which
 (at least) messes up the ToC layout.
Remove (some) docinfo tags containing dates. Best to omit if the dates
 are not accurate; maybe use CVS dates instead or leave them out.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.11 2002/03/06 06:48:03 momjian Exp $
d61 1
a61 1
CLOSE
@


1.11
log
@Update reference pages for new INFO, NOTICE, WARNING elog() levels.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.10 2002/01/20 22:19:56 petere Exp $
d8 1
a8 3
  <refentrytitle id="SQL-CLOSE-TITLE">
   CLOSE
  </refentrytitle>
@


1.10
log
@Spell-check and markup police
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.9 2001/12/08 03:24:34 thomas Exp $
d73 1
a73 1
NOTICE PerformPortalClose: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found
@


1.9
log
@Use PostgreSQL consistantly throughout docs. Before, usage was split evenly
 between Postgres and PostgreSQL.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.8 2001/09/03 12:57:49 petere Exp $
d128 1
a128 1
   Close the cursor liahona:
@


1.8
log
@Put some kind of grammatical uniformity in the <refpurpose> lines.
@
text
@d2 2
a3 2
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.7 1999/07/22 15:09:06 thomas Exp $
Postgres documentation
d115 1
a115 1
    <productname>Postgres</productname> does not have
@


1.7
log
@Complete merge of all old man page information.
ecpg reference page still needs formatting.
@
text
@d2 1
a2 1
$Header$
d18 1
a18 1
   Close a cursor
@


1.6
log
@Fix markup for docbook2man man page generation.
No big deal; fixed lots of other markup at the same time.
Bigest change: make sure there is no whitespace
 in front of <term> contents.
This will probably help the other output types too.
@
text
@d1 5
d8 1
a8 1
  <refentrytitle>
d23 1
a23 1
   <date>1998-09-08</date>
a138 2
  <para>
  </para>
@


1.5
log
@Clean up to ensure tag completion as required by the newest versions
 of Norm's Modular Style Sheets and jade/docbook.
From Vince Vielhaber <vev@@michvhf.com>.
@
text
@d1 3
a3 3
<REFENTRY ID="SQL-CLOSE">
 <REFMETA>
  <REFENTRYTITLE>
d5 5
a9 5
  </REFENTRYTITLE>
  <REFMISCINFO>SQL - Language Statements</REFMISCINFO>
 </REFMETA>
 <REFNAMEDIV>
  <REFNAME>
d11 2
a12 2
  </REFNAME>
  <REFPURPOSE>
d14 1
a14 1
  </REFPURPOSE>
d16 7
a22 7
 <REFSYNOPSISDIV>
  <REFSYNOPSISDIVINFO>
   <DATE>1998-09-08</DATE>
  </REFSYNOPSISDIVINFO>
  <SYNOPSIS>
CLOSE <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
  </SYNOPSIS>
d24 5
a28 5
  <REFSECT2 ID="R2-SQL-CLOSE-1">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d30 13
a42 14
   </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>
d44 1
a44 1
  </REFSECT2>
d46 5
a50 5
  <REFSECT2 ID="R2-SQL-CLOSE-2">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d52 23
a74 22
   </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.
d78 1
a78 1
    </VARIABLELIST>
d80 8
a87 8
  </REFSECT2>
 </REFSYNOPSISDIV>
 
 <REFSECT1 ID="R1-SQL-CLOSE-1">
  <REFSECT1INFO>
   <DATE>1998-09-08</DATE>
  </REFSECT1INFO>
  <TITLE>
d89 2
a90 2
  </TITLE>
  <PARA>
d95 2
a96 2
  </PARA>
  <PARA>
d100 1
a100 1
  </PARA>
d102 5
a106 5
  <REFSECT2 ID="R2-SQL-CLOSE-3">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d108 4
a111 4
   </TITLE>
   <PARA>
<productname>Postgres</productname> does not have
 an explicit <command>OPEN</command> cursor statement;
d114 2
a115 2
   </PARA>
  </REFSECT2>
d118 2
a119 2
 <REFSECT1 ID="R1-SQL-CLOSE-2">
  <TITLE>
d121 2
a122 2
  </TITLE>
  <PARA>
d124 2
a125 2
  </PARA>
  <ProgramListing>
d127 2
a128 2
  </ProgramListing>
 </REFSECT1>
d130 2
a131 2
 <REFSECT1 ID="R1-SQL-CLOSE-3">
  <TITLE>
d133 3
a135 3
  </TITLE>
  <PARA>
  </PARA>
d137 5
a141 5
  <REFSECT2 ID="R2-SQL-CLOSE-4">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d143 2
a144 2
   </TITLE>
   <PARA>
d146 1
a146 1
   </PARA>
d149 1
a149 2
</REFENTRY>

@


1.4
log
@Minor cleanup in markup, especially in the Output section.
@
text
@d15 1
a15 1

d44 1
d75 5
a79 3

   </VARIABLELIST>
   
@


1.3
log
@Markup and editing adjustments...
@
text
@a53 10
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
	  <replaceable>
	   status
	  </replaceable>
     </TERM>
     <LISTITEM>
      <PARA>
d74 1
a74 6
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
       </variablelist>
     </LISTITEM>
    </VARLISTENTRY>
@


1.2
log
@Very minor formatting fixup in the refentry id field to remove
 the trailing "-1". This makes a cleaner html output file name.
Clean up a few refpurpose fields.
@
text
@d18 1
a18 1
   <DATE>1998-04-15</DATE>
d26 1
a26 1
    <DATE>1998-04-15</DATE>
a31 7
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
     </TERM>
     <LISTITEM>
      <PARA>
a34 1
	  <ReturnValue>
a35 1
	  </ReturnValue>
a43 3
     </LISTITEM>
    </VARLISTENTRY>
   </VARIABLELIST>
d48 1
a48 1
    <DATE>1998-04-15</DATE>
d58 3
d67 1
a67 3
	  <ReturnValue>
	   CLOSE
	  </ReturnValue>
d77 1
a77 3
	  <ReturnValue>
	   NOTICE PerformPortalClose: portal "<REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>" not found
	  </ReturnValue>
d97 1
a97 1
   <DATE>1998-04-15</DATE>
d103 1
a103 1
   CLOSE frees the resources associated with an open cursor.
d110 2
a111 1
   transaction is terminated by COMMIT or ROLLBACK.
d116 1
a116 1
    <DATE>1998-04-15</DATE>
d122 4
a125 3
    PostgreSQL does not have an explicit OPEN cursor statement;
    a cursor is considered open when it is DECLAREd. 
    Use DECLARE to declare a cursor.
d138 1
a138 1
   CLOSE liahona;
d151 1
a151 1
    <DATE>1998-04-15</DATE>
d157 1
a157 1
    CLOSE is fully compatibile with SQL92.
@


1.1
log
@First files for reference pages.
@
text
@d1 1
a1 1
<REFENTRY ID="SQL-CLOSE-1">
@
