diff options
Diffstat (limited to 'doc/src/sgml')
-rw-r--r-- | doc/src/sgml/ref/allfiles.sgml | 3 | ||||
-rw-r--r-- | doc/src/sgml/ref/discard.sgml | 107 | ||||
-rw-r--r-- | doc/src/sgml/ref/reset.sgml | 59 | ||||
-rw-r--r-- | doc/src/sgml/reference.sgml | 3 |
4 files changed, 112 insertions, 60 deletions
diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index 3b9b8b952ee..90ad9adc53c 100644 --- a/doc/src/sgml/ref/allfiles.sgml +++ b/doc/src/sgml/ref/allfiles.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.69 2007/01/23 05:07:16 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.70 2007/04/26 16:13:08 neilc Exp $ PostgreSQL documentation Complete list of usable sgml source files in this directory. --> @@ -61,6 +61,7 @@ Complete list of usable sgml source files in this directory. <!entity deallocate system "deallocate.sgml"> <!entity declare system "declare.sgml"> <!entity delete system "delete.sgml"> +<!entity discard system "discard.sgml"> <!entity dropAggregate system "drop_aggregate.sgml"> <!entity dropCast system "drop_cast.sgml"> <!entity dropConversion system "drop_conversion.sgml"> diff --git a/doc/src/sgml/ref/discard.sgml b/doc/src/sgml/ref/discard.sgml new file mode 100644 index 00000000000..731f34136e1 --- /dev/null +++ b/doc/src/sgml/ref/discard.sgml @@ -0,0 +1,107 @@ +<!-- +$PostgreSQL: pgsql/doc/src/sgml/ref/discard.sgml,v 1.1 2007/04/26 16:13:09 neilc Exp $ +PostgreSQL documentation +--> + +<refentry id="SQL-DISCARD"> + <refmeta> + <refentrytitle id="SQL-DISCARD-TITLE">DISCARD</refentrytitle> + <refmiscinfo>SQL - Language Statements</refmiscinfo> + </refmeta> + + <refnamediv> + <refname>DISCARD</refname> + <refpurpose>Discard internal server state</refpurpose> + </refnamediv> + + <indexterm zone="sql-discard"> + <primary>DISCARD</primary> + </indexterm> + + <refsynopsisdiv> +<synopsis> +DISCARD { ALL | PLANS | TEMPORARY | TEMP } +</synopsis> + </refsynopsisdiv> + + <refsect1> + <title>Description</title> + + <para> + <command>DISCARD</> releases internal resources associated with a + database session. These resources are normally released at the end + of the session. + </para> + + <para> + <command>DISCARD TEMP</> drops all temporary tables created in the + current session. <command>DISCARD PLANS</> releases all internally + cached query plans. <command>DISCARD ALL</> resets a session to + its original state, discarding temporary resources and resetting + session-local configuration changes. + </para> + </refsect1> + + <refsect1> + <title>Parameters</title> + + <variablelist> + + <varlistentry> + <term><literal>TEMPORARY</literal> or <literal>TEMP</literal></term> + <listitem> + <para> + Drops all temporary tables created in the current session. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>PLANS</literal></term> + <listitem> + <para> + Releases all cached query plans. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>ALL</literal></term> + <listitem> + <para> + Releases all temporary resources associated with the current + session and resets the session to its initial state. This has + the same effect as executing the following sequence of + statements: +<programlisting> +SET SESSION AUTHORIZATION DEFAULT; +RESET ALL; +DEALLOCATE ALL; +CLOSE ALL; +UNLISTEN *; +DISCARD PLANS; +DISCARD TEMP; +</programlisting> + </para> + </listitem> + </varlistentry> + + </variablelist> + </refsect1> + + <refsect1> + <title>Notes</title> + + <para> + <command>DISCARD ALL</> cannot be executed inside a transaction block. + </para> + </refsect1> + + <refsect1> + <title>Compatibility</title> + + <para> + <command>DISCARD</command> is a <productname>PostgreSQL</productname> extension. + </para> + </refsect1> +</refentry> diff --git a/doc/src/sgml/ref/reset.sgml b/doc/src/sgml/ref/reset.sgml index e98f7ff56c6..355de891287 100644 --- a/doc/src/sgml/ref/reset.sgml +++ b/doc/src/sgml/ref/reset.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/reset.sgml,v 1.34 2007/04/12 22:34:45 neilc Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/reset.sgml,v 1.35 2007/04/26 16:13:09 neilc Exp $ PostgreSQL documentation --> @@ -22,7 +22,6 @@ PostgreSQL documentation <synopsis> RESET <replaceable class="PARAMETER">configuration_parameter</replaceable> RESET ALL -RESET { PLANS | SESSION | TEMP | TEMPORARY } </synopsis> </refsynopsisdiv> @@ -53,15 +52,6 @@ SET <replaceable class="parameter">configuration_parameter</replaceable> TO DEFA See the <command>SET</> reference page for details on the transaction behavior of <command>RESET</>. </para> - - <para> - <command>RESET</> can also be used to release internal resources - that are usually released at the end of session. <command>RESET - TEMP</> drops all temporary tables created in the current session. - <command>RESET PLANS</> releases all internally cached plans. - <command>RESET SESSION</> releases all externally visible temporary - resources associated with the current session. - </para> </refsect1> <refsect1> @@ -86,57 +76,10 @@ SET <replaceable class="parameter">configuration_parameter</replaceable> TO DEFA </para> </listitem> </varlistentry> - - <varlistentry> - <term><literal>TEMP, TEMPORARY</literal></term> - <listitem> - <para> - Drops all temporary tables created in the current session. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><literal>PLANS</literal></term> - <listitem> - <para> - Releases all cached query plans. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><literal>SESSION</literal></term> - <listitem> - <para> - Releases all temporary resources associated with the current - session. This has the same effect as executing the following - command sequence: -<programlisting> -SET SESSION AUTHORIZATION DEFAULT; -RESET ALL; -DEALLOCATE ALL; -CLOSE ALL; -UNLISTEN *; -RESET PLANS; -RESET TEMP; -</programlisting> - </para> - </listitem> - </varlistentry> - </variablelist> </refsect1> <refsect1> - <title>Notes</title> - - <para> - <command>RESET SESSION</> cannot be executed inside a transaction block. - </para> - </refsect1> - - <refsect1> <title>Examples</title> <para> diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml index 06c6c4a21db..06699a5b34b 100644 --- a/doc/src/sgml/reference.sgml +++ b/doc/src/sgml/reference.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/reference.sgml,v 1.62 2007/01/31 20:56:18 momjian Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/reference.sgml,v 1.63 2007/04/26 16:13:08 neilc Exp $ --> <part id="reference"> <title>Reference</title> @@ -89,6 +89,7 @@ &deallocate; &declare; &delete; + &discard; &dropAggregate; &dropCast; &dropConversion; |