1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
12 TITLE="PostgreSQL 7.4.1 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
27 CONTENT="2003-12-22T03:48:47"></HEAD
33 SUMMARY="Header navigation table"
43 >PostgreSQL 7.4.1 Documentation</TH
51 HREF="sql-selectinto.html"
60 HREF="sql-selectinto.html"
73 HREF="sql-set-constraints.html"
81 HREF="sql-set-constraints.html"
102 >SET -- change a run-time parameter</DIV
107 CLASS="REFSYNOPSISDIV"
115 >SET [ SESSION | LOCAL ] <VAR
125 SET [ SESSION | LOCAL ] TIME ZONE { <VAR
128 > | LOCAL | DEFAULT }</PRE
141 > command changes run-time configuration
142 parameters. Many of the run-time parameters listed in
144 HREF="runtime-config.html"
146 > can be changed on-the-fly with
151 (But some require superuser privileges to change, and others cannot
152 be changed after server or session start.)
156 > only affects the value used by the current
167 within a transaction that is later aborted, the effects of the
171 > command disappear when the transaction is rolled
172 back. (This behavior represents a change from
176 > versions prior to 7.3, where
180 > would not roll back after a later
181 error.) Once the surrounding transaction is committed, the effects
182 will persist until the end of the session, unless overridden by another
192 > last only till the end of
193 the current transaction, whether committed or not. A special case is
201 a single transaction: the <TT
205 seen until the end of the transaction, but afterwards (if the transaction
206 is committed) the <TT
209 > value will take effect.
231 > Specifies that the command takes effect for the current session.
232 (This is the default if neither <TT
249 > Specifies that the command takes effect for only the current
250 transaction. After <TT
257 the session-level setting takes effect again. Note that
261 > will appear to have no effect if it is
262 executed outside a <TT
266 transaction will end immediately.
276 > Name of a settable run-time parameter. Available parameters are
278 HREF="runtime-config.html"
290 > New value of parameter. Values can be specified as string
291 constants, identifiers, numbers, or comma-separated lists of
295 > can be used to specify
296 resetting the parameter to its default value.
302 > Besides the configuration parameters documented in <A
303 HREF="runtime-config.html"
305 >, there are a few that can only be
306 adjusted using the <TT
309 > command or that have a
333 >SET client_encoding TO <VAR
347 > Sets the internal seed for the random number generator (the
351 >). Allowed values are
352 floating-point numbers between 0 and 1, which are then
358 > The seed can also be set by invoking the function
364 CLASS="PROGRAMLISTING"
388 >SET timezone TO <VAR
396 > allows special syntax
397 for the time zone specification. Here are examples of valid
398 values (but note some are accepted only on some platforms):
412 > The time zone for Berkeley, California.
422 > The time zone for Portugal.
432 > The time zone for Italy.
442 > The time zone 7 hours west from UTC (equivalent
443 to PDT). Positive values are east from UTC.
449 >INTERVAL '-08:00' HOUR TO MINUTE</TT
453 > The time zone 8 hours west from UTC (equivalent
467 > Set the time zone to your local time zone (the one that
468 the server's operating system defaults to).
476 HREF="datatype-datetime.html"
478 > for more information
498 > provides equivalent
499 functionality. See <A
500 HREF="functions-misc.html"
513 > Set the schema search path:
515 CLASS="PROGRAMLISTING"
516 >SET search_path TO my_schema, public;</PRE
520 > Set the style of date to traditional
526 >"day before month"</SPAN
531 >SET datestyle TO postgres, dmy;</PRE
535 > Set the time zone for Berkeley, California, using quotes to
536 preserve the uppercase spelling of the time zone name:
539 >SET TIME ZONE 'PST8PDT';
540 SELECT current_timestamp AS today;
543 -------------------------------
544 2003-04-29 15:02:01.218622-07</PRE
559 > extends syntax defined in the SQL
560 standard. The standard allows only numeric time zone offsets while
564 > allows more flexible
565 time-zone specifications. All other <TT
583 HREF="sql-reset.html"
598 SUMMARY="Footer navigation table"
609 HREF="sql-selectinto.html"
627 HREF="sql-set-constraints.html"
643 HREF="sql-commands.html"