Set the cost of an index scan to the specified floating point value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
Sets the cost of an index scan to the default value.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
enables the genetic optimizer algorithm
for statements with 6 or more tables.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
On=<replaceable class="parameter">#</replaceable>
</term>
<listitem>
<para>
The frontend may be initialized by setting the PGCOSTINDEX
environment variable.
<variablelist>
<varlistentry>
<term>
GEQO
</term>
<listitem>
<para>
Sets the threshold for using the genetic optimizer algorithm.
</para>
<variablelist>
<varlistentry>
<term>
On
</term>
<listitem>
<para>
enables the genetic optimizer algorithm
for statements with 6 or more tables.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
On=<replaceable class="parameter">#</replaceable>
</term>
<listitem>
<para>
Takes an integer argument to enable the genetic optimizer algorithm
for statements with <replaceable class="parameter">#</replaceable>
or more tables in the query.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Off
</term>
<listitem>
<para>
disables the genetic optimizer algorithm.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
Equivalent to specifying <command>SET GEQO='on'</command>
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
Takes an integer argument to enable the genetic optimizer algorithm
for statements with <replaceable class="parameter">#</replaceable>
or more tables in the query.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Off
</term>
<listitem>
<para>
This algorithm is on by default, which used GEQO for
statements of eleven or more tables.
(See the chapter on GEQO in the Programmer's Guide
for more information).
disables the genetic optimizer algorithm.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
The frontend may be initialized by setting PGGEQO
environment variable.
Equivalent to specifying <command>SET GEQO='on'</command>
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
This algorithm is on by default, which used GEQO for
statements of eleven or more tables.
(See the chapter on GEQO in the Programmer's Guide
for more information).
</para>
<para>
The frontend may be initialized by setting PGGEQO
environment variable.
</para>
<para>
It may be useful when joining big relations with
small ones. This algorithm is off by default.
It's not used by GEQO anyway.
<variablelist>
<varlistentry>
<term>
KSQO
</term>
<listitem>
<para>
<firstterm>Key Set Query Optimizer</firstterm> forces the query optimizer
to optimize repetative OR clauses such as generated by
<productname>MicroSoft Access</productname>:
</para>
<variablelist>
<varlistentry>
<term>
On
</term>
<listitem>
<para>
It may be useful when joining big relations with
small ones. This algorithm is off by default.
It's not used by GEQO anyway.
<variablelist>
<varlistentry>
<term>
KSQO
</term>
<listitem>
<para>
<firstterm>Key Set Query Optimizer</firstterm> forces the query optimizer
to optimize repetative OR clauses such as generated by
<productname>MicroSoft Access</productname>:
</para>
<variablelist>
<varlistentry>
<term>
On
</term>
<listitem>
<para>
enables this optimization.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Off
</term>
<listitem>
<para>
disables this optimization.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
Equivalent to specifying <command>SET KSQO='off'</command>.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
enables this optimization.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Off
</term>
<listitem>
<para>
It may be useful when joining big relations with
small ones. This algorithm is off by default.
It's not used by GEQO anyway.
disables this optimization.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
The frontend may be initialized by setting the PGKSQO
environment variable.
<variablelist>
<varlistentry>
<term>
QUERY_LIMIT
</term>
<listitem>
<para>
Sets the number of rows returned by a query.
</para>
<variablelist>
<varlistentry>
<term>
Value
</term>
<listitem>
<para>
Maximum number of rows to return for a query. The default is to allow
an unlimited number of rows.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable class="parameter">#</replaceable>
</term>
<listitem>
<para>
Sets the maximum number of rows returned by a
query to <replaceable class="parameter">#</replaceable>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
Sets the maximum number of rows returned by a query to be unlimited.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
By default, there is no limit to the number of rows
returned by a query.
</para>
</listitem>
</varlistentry>
</variablelist>
Equivalent to specifying <command>SET KSQO='off'</command>.
</para>
</REFSECT2>
<REFSECT2 ID="R2-SQL-SET-2">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<returnvalue>SET VARIABLE</returnvalue>
</TERM>
<LISTITEM>
<PARA>
Message returned if successfully.
</para>
</listitem>
</varlistentry>
<VARLISTENTRY>
<TERM>
<returnvalue>WARN: Bad value for <replaceable class="parameter">variable</replaceable> (<replaceable class="parameter">value</replaceable>)</returnvalue>
</TERM>
<LISTITEM>
<PARA>
If the command fails to set variable.
</para>
</listitem>
</varlistentry>
</VARIABLELIST>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
It may be useful when joining big relations with
small ones. This algorithm is off by default.
It's not used by GEQO anyway.
</para>
<para>
The frontend may be initialized by setting the PGKSQO
environment variable.
<variablelist>
<varlistentry>
<term>
QUERY_LIMIT
</term>
<listitem>
<para>
Sets the number of rows returned by a query.
</para>
<variablelist>
<varlistentry>
<term>
Value
</term>
<listitem>
<para>
Maximum number of rows to return for a query. The default is to allow
an unlimited number of rows.
</para>
</REFSECT2>
</REFSYNOPSISDIV>
<REFSECT1 ID="R1-SQL-SET-1">
<REFSECT1INFO>
<DATE>1998-09-24</DATE>
</REFSECT1INFO>
<TITLE>
Description
</TITLE>
<PARA>
<command>SET</command> will modify configuration parameters for variable during
a session.
</para>
<para>
Current values can be obtained using <command>SHOW</command>, and values
can be restored to the defaults using <command>RESET</command>.
Parameters and values are case-insensitive. Note that the value
field is always specified as a string, so is enclosed in
single-quotes.
</para>
<para>
<command>SET TIME ZONE</command> changes the session's
default time zone offset.
A SQL-session always begins with an initial default time zone
offset.
The <command>SET TIME ZONE</command> statement is used to change the default
time zone offset for the current SQL session.
</para>
<REFSECT2 ID="R2-SQL-SET-3">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Notes
</TITLE>
<PARA>
The <command>SET <replaceable class="parameter">variable</replaceable></command>
statement is a <productname>Postgres</productname> language extension.
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable class="parameter">#</replaceable>
</term>
<listitem>
<para>
Sets the maximum number of rows returned by a
query to <replaceable class="parameter">#</replaceable>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
Refer to <command>SHOW</command> and <command>RESET</command> to
display or reset the current values.
Sets the maximum number of rows returned by a query to be unlimited.
</para>
</REFSECT2>
</REFSECT1>
<REFSECT1 ID="R1-SQL-SET-2">
<TITLE>
Usage
</TITLE>
<PARA>
</PARA>
<ProgramListing>
--Set the style of date to ISO:
--
SET DATESTYLE TO 'ISO';
</programlisting>
<programlisting>
--Enable GEQO for queries with 4 or more tables
--
SET GEQO ON=4;
</programlisting>
<programlisting>
--Set GEQO to default:
--
SET GEQO = DEFAULT;
</programlisting>
<programlisting>
--set the timezone for Berkeley, California:
SET TIME ZONE 'PST8PDT';
SELECT CURRENT_TIMESTAMP AS today;
today
----------------------
1998-03-31 07:41:21-08
</programlisting>
<programlisting>
--set the timezone for Italy:
SET TIME ZONE 'Europe/Rome';
SELECT CURRENT_TIMESTAMP AS today;
today
----------------------
1998-03-31 17:41:31+02
</ProgramListing>
</REFSECT1>
</listitem>
</varlistentry>
</variablelist>
<para>
By default, there is no limit to the number of rows
returned by a query.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</REFSECT2>
<REFSECT2 ID="R2-SQL-SET-2">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<returnvalue>SET VARIABLE</returnvalue>
</TERM>
<LISTITEM>
<PARA>
Message returned if successfully.
</para>
</listitem>
</varlistentry>
<VARLISTENTRY>
<TERM>
<returnvalue>WARN: Bad value for <replaceable class="parameter">variable</replaceable> (<replaceable class="parameter">value</replaceable>)</returnvalue>
</TERM>
<LISTITEM>
<PARA>
If the command fails to set variable.
</para>
</listitem>
</varlistentry>
</VARIABLELIST>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
<REFSECT1 ID="R1-SQL-SET-1">
<REFSECT1INFO>
<DATE>1998-09-24</DATE>
</REFSECT1INFO>
<TITLE>
Description
</TITLE>
<PARA>
<command>SET</command> will modify configuration parameters for variable during
a session.
</para>
<para>
Current values can be obtained using <command>SHOW</command>, and values
can be restored to the defaults using <command>RESET</command>.
Parameters and values are case-insensitive. Note that the value
field is always specified as a string, so is enclosed in
single-quotes.
</para>
<para>
<command>SET TIME ZONE</command> changes the session's
default time zone offset.
A SQL-session always begins with an initial default time zone
offset.
The <command>SET TIME ZONE</command> statement is used to change the default
time zone offset for the current SQL session.
</para>
<REFSECT2 ID="R2-SQL-SET-3">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Notes
</TITLE>
<PARA>
The <command>SET <replaceable class="parameter">variable</replaceable></command>
statement is a <productname>Postgres</productname> language extension.
</para>
<para>
Refer to <command>SHOW</command> and <command>RESET</command> to