1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
12
TITLE="PostgreSQL 9.1beta1 Documentation"
13
HREF="index.html"><LINK
16
HREF="sql-commands.html"><LINK
19
HREF="sql-selectinto.html"><LINK
21
TITLE="SET CONSTRAINTS"
22
HREF="sql-set-constraints.html"><LINK
25
HREF="stylesheet.css"><META
26
HTTP-EQUIV="Content-Type"
27
CONTENT="text/html; charset=ISO-8859-1"><META
29
CONTENT="2011-04-27T21:20:33"></HEAD
35
SUMMARY="Header navigation table"
47
>PostgreSQL 9.1beta1 Documentation</A
57
HREF="sql-selectinto.html"
67
HREF="sql-selectinto.html"
80
TITLE="SET CONSTRAINTS"
81
HREF="sql-set-constraints.html"
89
TITLE="SET CONSTRAINTS"
90
HREF="sql-set-constraints.html"
111
>SET -- change a run-time parameter</DIV
113
CLASS="REFSYNOPSISDIV"
121
>SET [ SESSION | LOCAL ] <TT
124
>configuration_parameter</I
137
SET [ SESSION | LOCAL ] TIME ZONE { <TT
142
> | LOCAL | DEFAULT }</PRE
155
> command changes run-time configuration
156
parameters. Many of the run-time parameters listed in
158
HREF="runtime-config.html"
160
> can be changed on-the-fly with
165
(But some require superuser privileges to change, and others cannot
166
be changed after server or session start.)
170
> only affects the value used by the current
177
> (or equivalently <TT
181
is issued within a transaction that is later aborted, the effects of the
185
> command disappear when the transaction is rolled
186
back. Once the surrounding transaction is committed, the effects
187
will persist until the end of the session, unless overridden by another
197
> last only till the end of
198
the current transaction, whether committed or not. A special case is
206
a single transaction: the <TT
210
seen until the end of the transaction, but afterwards (if the transaction
211
is committed) the <TT
214
> value will take effect.
224
also canceled by rolling back to a savepoint that is earlier than the
231
> is used within a function that has a
235
> option for the same variable (see
237
HREF="sql-createfunction.html"
240
the effects of the <TT
243
> command disappear at
244
function exit; that is, the value in effect when the function was called is
245
restored anyway. This allows <TT
249
dynamic or repeated changes of a parameter within a function, while still
250
having the convenience of using the <TT
254
restore the caller's value. However, a regular <TT
258
overrides any surrounding function's <TT
261
> option; its effects
262
will persist unless rolled back.
274
> versions 8.0 through 8.2,
278
> would be canceled by
279
releasing an earlier savepoint, or by successful exit from a
283
> exception block. This behavior
284
has been changed because it was deemed unintuitive.
308
> Specifies that the command takes effect for the current session.
309
(This is the default if neither <TT
326
> Specifies that the command takes effect for only the current
327
transaction. After <TT
334
the session-level setting takes effect again. Note that
338
> will appear to have no effect if it is
339
executed outside a <TT
343
transaction will end immediately.
350
>configuration_parameter</I
355
> Name of a settable run-time parameter. Available parameters are
357
HREF="runtime-config.html"
371
> New value of parameter. Values can be specified as string
372
constants, identifiers, numbers, or comma-separated lists of
373
these, as appropriate for the particular parameter.
377
> can be written to specify
378
resetting the parameter to its default value (that is, whatever
379
value it would have had if no <TT
383
in the current session).
389
> Besides the configuration parameters documented in <A
390
HREF="runtime-config.html"
392
>, there are a few that can only be
393
adjusted using the <TT
396
> command or that have a
422
>SET search_path TO <TT
429
schema can be specified using this syntax.
450
>SET client_encoding TO <TT
466
> Sets the internal seed for the random number generator (the
470
>). Allowed values are
471
floating-point numbers between -1 and 1, which are then
477
> The seed can also be set by invoking the function
483
CLASS="PROGRAMLISTING"
521
> allows special syntax
522
for the time zone specification. Here are examples of valid
537
> The time zone for Berkeley, California.
547
> The time zone for Italy.
557
> The time zone 7 hours west from UTC (equivalent
558
to PDT). Positive values are east from UTC.
564
>INTERVAL '-08:00' HOUR TO MINUTE</TT
568
> The time zone 8 hours west from UTC (equivalent
582
> Set the time zone to your local time zone (that is, the
583
server's default value of <TT
587
has not been explicitly set anywhere, it will be the zone that
588
the server's operating system defaults to).
596
HREF="datatype-datetime.html#DATATYPE-TIMEZONES"
598
> for more information
618
> provides equivalent
619
functionality; see <A
620
HREF="functions-admin.html"
623
Also, it is possible to UPDATE the
625
HREF="view-pg-settings.html"
631
system view to perform the equivalent of <TT
645
> Set the schema search path:
647
CLASS="PROGRAMLISTING"
648
>SET search_path TO my_schema, public;</PRE
652
> Set the style of date to traditional
658
>"day before month"</SPAN
663
>SET datestyle TO postgres, dmy;</PRE
667
> Set the time zone for Berkeley, California:
670
>SET TIME ZONE 'PST8PDT';</PRE
674
> Set the time zone for Italy:
677
>SET TIME ZONE 'Europe/Rome';</PRE
692
> extends syntax defined in the SQL
693
standard. The standard allows only numeric time zone offsets while
697
> allows more flexible
698
time-zone specifications. All other <TT
716
HREF="sql-reset.html"
727
SUMMARY="Footer navigation table"
738
HREF="sql-selectinto.html"
756
HREF="sql-set-constraints.html"
772
HREF="sql-commands.html"
b'\\ No newline at end of file'