mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
There is what may actually be a mistake in our markup. The problem is in a situation like <para> <command>FOO</command> is ... there is strictly speaking a line break before "FOO". In the HTML output, this does not appear to be a problem, but in the man page output, this shows up, so you get double blank lines at odd places. So far, we have attempted to work around this with an XSL hack, but that causes other problems, such as creating run-ins in places like <acronym>SQL</acronym> <command>COPY</command> So fix the problem properly by removing the extra whitespace. I only fixed the problems that affect the man page output, not all the places.
109 lines
2.4 KiB
Plaintext
109 lines
2.4 KiB
Plaintext
<!--
|
|
doc/src/sgml/ref/discard.sgml
|
|
PostgreSQL documentation
|
|
-->
|
|
|
|
<refentry id="SQL-DISCARD">
|
|
<refmeta>
|
|
<refentrytitle>DISCARD</refentrytitle>
|
|
<manvolnum>7</manvolnum>
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>DISCARD</refname>
|
|
<refpurpose>discard session 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.
|
|
Currently, this has the same effect as executing the following sequence
|
|
of statements:
|
|
<programlisting>
|
|
SET SESSION AUTHORIZATION DEFAULT;
|
|
RESET ALL;
|
|
DEALLOCATE ALL;
|
|
CLOSE ALL;
|
|
UNLISTEN *;
|
|
SELECT pg_advisory_unlock_all();
|
|
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>
|