Skip to content

Commit fa0ed6f

Browse files
committed
Update SET commands for psql \h, man pages, and sgml.
1 parent ee5764b commit fa0ed6f

File tree

3 files changed

+87
-28
lines changed

3 files changed

+87
-28
lines changed

doc/src/sgml/ref/set.sgml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,49 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
526526
</listitem>
527527
</varlistentry>
528528
</variablelist>
529+
530+
<variablelist>
531+
<varlistentry>
532+
<term>
533+
XACTISOLEVEL
534+
</term>
535+
<listitem>
536+
<para>
537+
Sets the isolation level for transactions.
538+
539+
<variablelist>
540+
<varlistentry>
541+
<term>
542+
<replaceable class="parameter">value</replaceable>
543+
</term>
544+
<listitem>
545+
<para>
546+
Sets the isolation level for transactions to
547+
'SERIALIZABLE' or 'COMMITTED'.
548+
</para>
549+
</listitem>
550+
</varlistentry>
529551
</para>
552+
553+
<varlistentry>
554+
<term>
555+
DEFAULT
556+
</term>
557+
<listitem>
558+
<para>
559+
Sets the cost of a heap scan to the default value.
560+
</para>
561+
</listitem>
562+
</varlistentry>
563+
</variablelist>
564+
</para>
565+
<para>
566+
The frontend may be initialized by setting the PGCOSTHEAP
567+
environment variable.
568+
</para>
569+
570+
571+
530572
</REFSECT2>
531573

532574
<REFSECT2 ID="R2-SQL-SET-2">

src/bin/psql/psqlHelp.h

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: psqlHelp.h,v 1.63 1999/04/18 03:01:49 tgl Exp $
8+
* $Id: psqlHelp.h,v 1.64 1999/06/03 18:18:42 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -294,13 +294,9 @@ static struct _helpStruct QL_HELP[] = {
294294
\tNOTIFY name|\"non-name string\""},
295295
{"reset",
296296
"set run-time environment back to default",
297-
#ifdef MULTIBYTE
298297
"\
299-
\tRESET DateStyle|GEQO|R_PLANS|QUERY_LIMIT|CLIENT_ENCODING"},
300-
#else
301-
"\
302-
\tRESET DateStyle|GEQO|R_PLANS|QUERY_LIMIT"},
303-
#endif
298+
\tRESET DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|QUERY_LIMIT|\n\
299+
TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
304300
{"revoke",
305301
"revoke access control from a user or group",
306302
"\
@@ -324,29 +320,22 @@ static struct _helpStruct QL_HELP[] = {
324320
\t[ { UNION [ALL] | INTERSECT | EXCEPT } SELECT ...];"},
325321
{"set",
326322
"set run-time environment",
327-
#ifdef MULTIBYTE
328323
"\
329-
\tSET DateStyle TO 'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'\n\
324+
\tSET DATESTYLE TO 'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'\n\
325+
set COST_HEAP TO #\n\
326+
set COST_INDEX TO #\n\
330327
set GEQO TO 'ON[=#]'|'OFF'\n\
331-
set R_PLANS TO 'ON'|'OFF'\n\
328+
set KSQO TO 'ON'|'OFF'\n\
332329
set QUERY_LIMIT TO #\n\
333-
set CLIENT_ENCODING TO 'EUC_JP'|'SJIS'|'EUC_CN'|'EUC_KR'|'EUC_TW'|'BIG5'|'MULE_INTERNAL'|'LATIN1'|'LATIN2'|'LATIN3'|'LATIN4'|'LATIN5'|'KOI8|'WIN'|'ALT'"},
334-
#else
335-
"\
336-
\tSET DateStyle TO 'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'\n\
337-
set GEQO TO 'ON[=#]'|'OFF'\n\
338-
set R_PLANS TO 'ON'| 'OFF'\n\
339-
set QUERY_LIMIT TO #"},
340-
#endif
330+
set TIMEZONE TO 'value'\n\
331+
set XACTISOLEVEL TO 'SERIALIZABLE'|'COMMITTED'\n\
332+
set CLIENT_ENCODING TO 'EUC_JP'|'SJIS'|'EUC_CN'|'EUC_KR'|'EUC_TW'|'BIG5'|'MULE_INTERNAL'|'LATIN1'|'LATIN2'|'LATIN3'|'LATIN4'|'LATIN5'|'KOI8|'WIN'|'ALT'\n\
333+
set SERVER_ENCODING TO 'EUC_JP'|'SJIS'|'EUC_CN'|'EUC_KR'|'EUC_TW'|'BIG5'|'MULE_INTERNAL'|'LATIN1'|'LATIN2'|'LATIN3'|'LATIN4'|'LATIN5'|'KOI8|'WIN'|'ALT'"},
341334
{"show",
342335
"show current run-time environment",
343-
#ifdef MULTIBYTE
344-
"\
345-
\tSHOW DateStyle|GEQO|R_PLANS|QUERY_LIMIT|CLIENT_ENCODING"},
346-
#else
347336
"\
348-
\tSHOW DateStyle|GEQO|R_PLANS|QUERY_LIMIT"},
349-
#endif
337+
\tSHOW DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|QUERY_LIMIT|\n\
338+
TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
350339
{"unlisten",
351340
"stop listening for notification on a condition name",
352341
"\

src/man/set.l

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.16 1999/03/07 12:00:40 momjian Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.17 1999/06/03 18:18:43 momjian Exp $
44
.TH SET SQL 05/14/97 PostgreSQL PostgreSQL
55
.SH NAME
66
set - set run-time parameters for session
@@ -22,7 +22,7 @@ Parameters and values are case-insensitive.
2222
Note that the value field is always specified as a string, so
2323
is enclosed in single-quotes.
2424
.PP
25-
.IR DateStyle
25+
.IR DATESTYLE
2626
determines the output format for the date and time data types.
2727

2828
.ce 1
@@ -40,6 +40,13 @@ determines the output format for the date and time data types.
4040
US - same as 'NonEuropean'
4141
default - restores the default values ('US,Postgres')
4242
.fi
43+
44+
.PP
45+
.IR COST_HEAP
46+
sets the cost uses for heap scans by the optimizer.
47+
.PP
48+
.IR COST_INDEX
49+
sets the cost uses for index scans by the optimizer.
4350
.PP
4451
.IR GEQO
4552
enables or disables the genetic optimizer algorithm. This algorithm is
@@ -61,9 +68,32 @@ for more information.
6168
off - do not use the genetic optimizer
6269
.fi
6370
.PP
71+
.IR KSQO
72+
enables or disables a workaround for memory exhaustion in queries with many
73+
.B OR
74+
clauses.
75+
The default is disabled.
76+
.PP
6477
.IR QUERY_LIMIT
6578
restricts the number of rows returned by a query.
6679
The default is unlimited.
80+
.PP
81+
.IR TIMEZONE
82+
sets your timezone.
83+
.PP
84+
.IR XACTISOLEVEL
85+
sets the transaction isolation level to
86+
.IR SERIALIZABLE
87+
or
88+
.IR COMMITTED .
89+
.PP
90+
.IR CLIENT_ENCODING
91+
sets the character set encoding of the client. Only available if multi-byte
92+
is enabled at configure time.
93+
.PP
94+
.IR SERVER_ENCODING
95+
sets the character set encoding of the server. Only available if multi-byte
96+
is enabled at configure time.
6797

6898

6999
.SH EXAMPLES
@@ -94,5 +124,3 @@ set GEQO to 'off'
94124
.SH "SEE ALSO"
95125
reset(l),
96126
show(l).
97-
.SH BUGS
98-
Of course.

0 commit comments

Comments
 (0)