aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/set_session.sgml
blob: b542d6646e8e6837aad6d84ac1ccb8750a408788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/set_session.sgml,v 1.1 2000/07/14 15:27:14 thomas Exp $
Postgres documentation
-->

<refentry id="SQL-SET-SESSION">
 <refmeta>
  <refentrytitle id="SQL-SET-SESSION-TITLE">SET</refentrytitle>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>
 <refnamediv>
  <refname>SET SESSION CHARACTERISTICS</refname>
  <refpurpose>Set per-session run-time parameters</refpurpose>
 </refnamediv>
 <refsynopsisdiv>
  <synopsis>
SET SESSION CHARACTERISTICS TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
SET SESSION CHARACTERISTICS TIME ZONE { '<replaceable class="PARAMETER">timezone</replaceable>' | LOCAL | DEFAULT }
  </synopsis>
 </refsynopsisdiv>

 <refsect1 id="R1-SQL-SET-SESSION-1">
  <title>Description</title>
  <para>
   <command>SET SESSION CHARACTERISTICS</command> changes the run-time
   environment for the entire <acronym>SQL</acronym>
   session. Currently, transaction isolation level and time zone can
   be specified by this command.
  </para>

  <para>
   Use <xref linkend="SQL-SHOW" endterm="SQL-SHOW-title"> to show the
   current setting of a parameters.
  </para>

  <para>
   Refer to <xref linkend="SQL-SET-TRANSACTION" endterm="SQL-SET-TRANSACTION-TITLE">
   and to <xref linkend="SQL-SET" endterm="SQL-SET-TITLE"> for more
   information on allowed parameters.
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   Set the timezone for Berkeley, California, using double quotes to
   preserve the uppercase attributes of the time zone specifier (note
   that the date/time format is ISO here):

<screen> 
SET SESSION CHARACTERISTICS TIME ZONE "PST8PDT";
SELECT CURRENT_TIMESTAMP AS today;
   
         today
------------------------
 1998-07-14 07:41:21-07
</screen>
  </para>
 </refsect1>

 <refsect1 id="R1-SQL-SET-SESSION-3">
  <title>Compatibility</title>

  <refsect2 id="R2-SQL-SET-SESSION-4">
   <title>SQL99</title>

   <para>
    <command>SET SESSION</command> is defined in
    <acronym>SQL99</acronym>.
   </para>
  </refsect2>
 </refsect1>
</refentry>

<!-- 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:
-->