reset.sgml 3.3 KB
Newer Older
1
<!--
2
$PostgreSQL: pgsql/doc/src/sgml/ref/reset.sgml,v 1.27 2006/04/25 14:09:06 momjian Exp $
3
PostgreSQL documentation
4 5
-->

T
Thomas G. Lockhart 已提交
6 7
<refentry id="SQL-RESET">
 <refmeta>
8
  <refentrytitle id="SQL-RESET-TITLE">RESET</refentrytitle>
T
Thomas G. Lockhart 已提交
9 10
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>
11

T
Thomas G. Lockhart 已提交
12
 <refnamediv>
13
  <refname>RESET</refname>
14 15
  <refpurpose>restore the value of a run-time parameter to the default value,
  or reset all aspects of a session</refpurpose>
T
Thomas G. Lockhart 已提交
16
 </refnamediv>
17

P
Peter Eisentraut 已提交
18 19 20 21
 <indexterm zone="sql-reset">
  <primary>RESET</primary>
 </indexterm>

T
Thomas G. Lockhart 已提交
22
 <refsynopsisdiv>
23
<synopsis>
24
RESET <replaceable class="PARAMETER">name</replaceable>
25
RESET ALL
26
RESET CONNECTION
27
</synopsis>
T
Thomas G. Lockhart 已提交
28
 </refsynopsisdiv>
29
  
30 31
 <refsect1>
  <title>Description</title>
32

T
Thomas G. Lockhart 已提交
33
  <para>
34
   <command>RESET</command> restores run-time parameters to their
35 36 37 38 39 40 41 42
   default values.  <command>RESET</command> is an alternative
   spelling for
<synopsis>
SET <replaceable class="parameter">parameter</replaceable> TO DEFAULT
</synopsis>
   Refer to <xref linkend="sql-set" endterm="sql-set-title"> for
   details.
  </para>
43

44 45
  <para>
   The default value is defined as the value that the parameter would
46 47
   have had, had no <command>SET</> ever been issued for it in the
   current session.  The actual source of this value might be a
48 49 50
   compiled-in default, the configuration file, command-line options,
   or per-database or per-user default settings.  See <xref
   linkend="runtime-config"> for details.
T
Thomas G. Lockhart 已提交
51
  </para>
52 53

  <para>
54
   See the <command>SET</> reference page for details on the
55 56 57
   transaction behavior of <command>RESET</>.  <command>RESET
   CONNECTION</command> can be used to reset all aspects of
   a session, not just parameter values.
58
  </para>
59

60
 </refsect1>
61

62 63 64 65 66
 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
67
    <term><replaceable class="PARAMETER">name</replaceable></term>
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
    <listitem>
     <para>
      The name of a run-time parameter. See <xref linkend="sql-set"
      endterm="sql-set-title"> for a list.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>ALL</literal></term>
    <listitem>
     <para>
      Resets all settable run-time parameters to default values.
     </para>
    </listitem>
   </varlistentry>
84 85 86 87 88 89 90 91 92 93 94 95

   <varlistentry>
    <term><literal>CONNECTION</literal></term>
    <listitem>
     <para>
      Reset the all aspects of a session, including runtime parameters,
      transaction status, temporary tables, <literal>WITH HOLD</literal>
      cursors, prepared statements, and <command>LISTEN</command>
      registrations.
     </para>
    </listitem>
   </varlistentry>
96
  </variablelist>
97

98
 </refsect1>
99

100 101
 <refsect1>
  <title>Examples</title>
102

103
  <para>
104
   Set the <varname>geqo</> configuration variable to its default value:
105 106
<screen>
RESET geqo;
107
</screen>
T
Thomas G. Lockhart 已提交
108 109 110
  </para>
 </refsect1>

111 112
 <refsect1>
  <title>Compatibility</title>
113

114
  <para>
115
   <command>RESET</command> is a <productname>PostgreSQL</productname> extension.
116
  </para>
T
Thomas G. Lockhart 已提交
117 118
 </refsect1>
</refentry>
119

T
Thomas G. Lockhart 已提交
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
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:
-->