Skip to content

Commit f0811a7

Browse files
committed
Merge the last few variable.c configuration variables into the generic
GUC support. It's now possible to set datestyle, timezone, and client_encoding from postgresql.conf and per-database or per-user settings. Also, implement rollback of SET commands that occur in a transaction that later fails. Create a SET LOCAL var = value syntax that sets the variable only for the duration of the current transaction. All per previous discussions in pghackers.
1 parent fa613fa commit f0811a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2742
-1903
lines changed

doc/src/sgml/ref/alter_database.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.2 2002/04/23 02:07:15 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.3 2002/05/17 01:19:16 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -28,10 +28,9 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET <replacea
2828
<command>ALTER DATABASE</command> is used to change the session
2929
default of a run-time configuration variable for a
3030
<productname>PostgreSQL</productname> database. Whenever a new
31-
session is subsequently started in that database, <literal>SET
32-
<replaceable>variable</replaceable> TO
33-
<replaceable>value</replaceable></literal> is effectively executed
34-
before the start of the session. The database-specific default
31+
session is subsequently started in that database, the specified
32+
value becomes the session default value.
33+
The database-specific default
3534
overrides whatever setting is present in <filename>postgresql.conf</>
3635
or has been received from the postmaster.
3736
</para>
@@ -64,7 +63,8 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET <replacea
6463
configuration variable to the given value. If
6564
<replaceable>value</replaceable> is <literal>DEFAULT</literal>
6665
or, equivalently, <literal>RESET</literal> is used, the
67-
database-specific variable setting is removed and the default
66+
database-specific variable setting is removed and the system-wide
67+
default
6868
setting will be inherited in new sessions. Use <literal>RESET
6969
ALL</literal> to clear all settings.
7070
</para>

doc/src/sgml/ref/alter_user.sgml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.21 2002/03/22 19:20:36 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.22 2002/05/17 01:19:16 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -48,14 +48,13 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable> RESET <replacea
4848
</para>
4949

5050
<para>
51-
The second and the third variant change a user's session default of
51+
The second and the third variant change a user's session default for
5252
a specified configuration variable. Whenever the user subsequently
53-
starts a new session, <literal>SET
54-
<replaceable>variable</replaceable> TO
55-
<replaceable>value</replaceable></literal> is effectively executed
56-
before the start of the session. Ordinary users can change their
57-
own session defaults. Superusers can change anyone's session
58-
defaults.
53+
starts a new session, the specified value becomes the session default,
54+
overriding whatever setting is present in <filename>postgresql.conf</>
55+
or has been received from the postmaster.
56+
Ordinary users can change their own session defaults.
57+
Superusers can change anyone's session defaults.
5958
</para>
6059

6160
<refsect2>
@@ -135,12 +134,12 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable> RESET <replacea
135134
<term><replaceable>value</replaceable></term>
136135
<listitem>
137136
<para>
138-
Set this user's session default of the specified configuration
137+
Set this user's session default for the specified configuration
139138
variable to the given value. If
140139
<replaceable>value</replaceable> is <literal>DEFAULT</literal>
141140
or, equivalently, <literal>RESET</literal> is used, the
142141
user-specific variable setting is removed and the user will
143-
inherit the default setting in new sessions. Use
142+
inherit the system-wide default setting in new sessions. Use
144143
<literal>RESET ALL</literal> to clear all settings.
145144
</para>
146145

doc/src/sgml/ref/reset.sgml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.13 2001/12/08 03:24:39 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.14 2002/05/17 01:19:16 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -37,7 +37,7 @@ RESET ALL
3737
<term>ALL</term>
3838
<listitem>
3939
<para>
40-
Resets all run-time parameters to default values.
40+
Resets all settable run-time parameters to default values.
4141
</para>
4242
</listitem>
4343
</varlistentry>
@@ -53,11 +53,18 @@ RESET ALL
5353
<command>RESET</command> restores run-time parameters to their
5454
default values. Refer to
5555
<xref linkend="sql-set" endterm="sql-set-title">
56-
for details. <command>RESET</command> is an alternate form for
56+
for details. <command>RESET</command> is an alternate spelling for
5757

5858
<synopsis>
5959
SET <replaceable class="parameter">variable</replaceable> TO DEFAULT
6060
</synopsis>
61+
62+
The default value is defined as the value that the variable would
63+
have had, had no <command>SET</> ever been issued for it in the
64+
current session. The actual source of this value might be a
65+
compiled-in default, the postmaster's configuration file or command-line
66+
switches, or per-database or per-user default settings. See the
67+
<citetitle>Administrator's Guide</citetitle> for details.
6168
</para>
6269
</refsect1>
6370

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy