mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add input parameters for LOCK TABLE. Still needs explanation from Vadim.
Fix markup.
This commit is contained in:
@ -1,84 +1,156 @@
|
||||
<REFENTRY ID="SQL-LOCK">
|
||||
<REFMETA>
|
||||
<REFENTRYTITLE>
|
||||
<refentry id="SQL-LOCK">
|
||||
<refmeta>
|
||||
<refentrytitle>
|
||||
LOCK
|
||||
</REFENTRYTITLE>
|
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
||||
</REFMETA>
|
||||
<REFNAMEDIV>
|
||||
<REFNAME>
|
||||
</refentrytitle>
|
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>
|
||||
LOCK
|
||||
</REFNAME>
|
||||
<REFPURPOSE>
|
||||
</refname>
|
||||
<refpurpose>
|
||||
Explicit lock of a table inside a transaction
|
||||
</REFPURPOSE>
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
LOCK [ TABLE ] [IN [ROW|ACCESS] [SHARE|EXCLUSIVE] | [SHARE ROW EXCLUSIVE] MODE]
|
||||
<REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||
</SYNOPSIS>
|
||||
<refsynopsisdiv>
|
||||
<refsynopsisdivinfo>
|
||||
<date>1998-09-24</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
LOCK [ TABLE ] <replaceable class="PARAMETER">table</replaceable>
|
||||
LOCK [ TABLE ] <replaceable class="PARAMETER">table</replaceable> IN [ ROW | ACCESS ] { SHARE | EXCLUSIVE } MODE
|
||||
LOCK [ TABLE ] <replaceable class="PARAMETER">table</replaceable> IN SHARE ROW EXCLUSIVE MODE
|
||||
</synopsis>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOCK-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-LOCK-1">
|
||||
<refsect2info>
|
||||
<date>1998-09-01</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">table</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of an existing table to lock.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
<varlistentry>
|
||||
<term>
|
||||
SHARE MODE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOCK-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<varlistentry>
|
||||
<term>
|
||||
EXCLUSIVE MODE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
ROW SHARE MODE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
ROW EXCLUSIVE MODE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
ACCESS SHARE MODE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
ACCESS EXCLUSIVE MODE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
SHARE ROW EXCLUSIVE MODE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="R2-SQL-LOCK-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<VARIABLELIST>
|
||||
<TERM>
|
||||
ERROR <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>: Table does not exist.
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
ERROR <replaceable class="PARAMETER">table</replaceable>: Table does not exist.
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Message returned if <replaceable class="PARAMETER">table</replaceable>
|
||||
does not exist.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</VARIABLELIST>
|
||||
</variablelist>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
</refsect2>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-LOCK-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-LOCK-1">
|
||||
<refsect1info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect1info>
|
||||
<title>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
By default, <command>LOCK</command> locks in exclusive mode a table inside
|
||||
a transaction. Various options allow shared access, or row-level locking
|
||||
control. The classic use for this is
|
||||
@ -112,13 +184,13 @@
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOCK-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-LOCK-3">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Notes
|
||||
</TITLE>
|
||||
</title>
|
||||
<para>
|
||||
<command>LOCK</command> is a <productname>Postgres</productname>
|
||||
language extension.
|
||||
@ -134,16 +206,16 @@
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-LOCK-2">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-LOCK-2">
|
||||
<title>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
</title>
|
||||
<para>
|
||||
</para>
|
||||
<programlisting>
|
||||
--Explicit locking to prevent deadlock:
|
||||
--
|
||||
BEGIN WORK;
|
||||
@ -152,30 +224,30 @@
|
||||
UPDATE films SET len = INTERVAL '100 minute'
|
||||
WHERE len = INTERVAL '117 minute';
|
||||
COMMIT WORK;
|
||||
</ProgramListing>
|
||||
</programlisting>
|
||||
|
||||
</REFSECT1>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-LOCK-3">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-LOCK-3">
|
||||
<title>
|
||||
Compatibility
|
||||
</TITLE>
|
||||
</title>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOCK-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-LOCK-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
There is no <command>LOCK TABLE</command> in <acronym>SQL92</acronym>,
|
||||
which instead uses <command>SET TRANSACTION</command> to specify
|
||||
concurrency level on transactions. We support that too.
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</REFENTRY>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@ -1,42 +1,43 @@
|
||||
<REFENTRY ID="SQL-SET">
|
||||
<REFMETA>
|
||||
<REFENTRYTITLE>
|
||||
<refentry id="SQL-SET">
|
||||
<refmeta>
|
||||
<refentrytitle>
|
||||
SET
|
||||
</REFENTRYTITLE>
|
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
||||
</REFMETA>
|
||||
<REFNAMEDIV>
|
||||
<REFNAME>
|
||||
</refentrytitle>
|
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>
|
||||
SET
|
||||
</REFNAME>
|
||||
<REFPURPOSE>
|
||||
</refname>
|
||||
<refpurpose>
|
||||
Set run-time parameters for session
|
||||
</REFPURPOSE>
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
SET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> { TO | = } { '<REPLACEABLE CLASS="PARAMETER">value</REPLACEABLE>' | DEFAULT }
|
||||
SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL };
|
||||
</SYNOPSIS>
|
||||
<refsynopsisdiv>
|
||||
<refsynopsisdivinfo>
|
||||
<date>1998-09-24</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
SET <replaceable class="PARAMETER">variable</replaceable> { TO | = } { '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
|
||||
SET TIME ZONE { '<replaceable class="PARAMETER">timezone</replaceable>' | LOCAL | DEFAULT };
|
||||
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED | DEFAULT }
|
||||
</synopsis>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SET-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-SET-1">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">variable</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Settable global parameter.
|
||||
</para>
|
||||
@ -44,114 +45,152 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<REPLACEABLE CLASS="PARAMETER">value</REPLACEABLE>
|
||||
<replaceable class="PARAMETER">value</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<PARA>
|
||||
<para>
|
||||
New value of parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The possible variables and allowed values are:
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
DateStyle
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
CLIENT_ENCODING | NAMES
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte client encoding
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">value</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte client encoding to
|
||||
<replaceable class="parameter">value</replaceable>.
|
||||
The specified encoding must be supported by the backend.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
DEFAULT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte client encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This is only enabled if multi-byte was specified to configure.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
DateStyle
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
ISO
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
use ISO 8601-style dates and times
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
SQL
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
use Oracle/Ingres-style dates and times
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Postgres
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
use traditional <productname>Postgres</productname> format
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
European
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
use dd/mm/yyyy for numeric date representations.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
NonEuropean
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
use mm/dd/yyyy for numeric date representations.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
German
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
use dd.mm.yyyy for numeric date representations.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
US
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
same as 'NonEuropean'
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
default
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
restores the default values ('US,Postgres')
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Date format initialization my be done by:
|
||||
<simplelist>
|
||||
@ -180,10 +219,48 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
int DateStyle = USE_ISO_DATES | USE_POSTGRES_DATES | USE_SQL_DATES | USE_GERMAN_DATES
|
||||
</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
SERVER_ENCODING
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte server encoding
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">value</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte server encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
DEFAULT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte server encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
<variablelist>
|
||||
This is only enabled if multi-byte was specified to configure.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
TIMEZONE
|
||||
@ -257,8 +334,59 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
TRANSACTION ISOLATION LEVEL
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the isolation level for the current transaction.
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
READ COMMITTED
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The current transaction reads only
|
||||
committed rows. READ COMMITTED is the default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
SERIALIZABLE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The current transaction will place a
|
||||
lock on every row read, so later reads in that transaction
|
||||
see the rows unmodified by other transactions.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
DEFAULT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the isolation level for the current transaction to
|
||||
<option>READ COMMITTED</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are also several internal or optimization
|
||||
parameters which can be specified
|
||||
@ -301,7 +429,9 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
The frontend may be initialized by setting the PGCOSTHEAP
|
||||
environment variable.
|
||||
</para>
|
||||
<variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
COST_INDEX
|
||||
@ -309,10 +439,8 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the default cost of an index scan for use by the optimizer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">float4</replaceable>
|
||||
@ -335,15 +463,15 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The frontend may be initialized by setting the PGCOSTINDEX
|
||||
environment variable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
GEQO
|
||||
@ -351,12 +479,11 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the threshold for using the genetic optimizer algorithm.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
On
|
||||
ON
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
@ -367,7 +494,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
On=<replaceable class="parameter">#</replaceable>
|
||||
ON=<replaceable class="parameter">#</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
@ -379,7 +506,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Off
|
||||
OFF
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
@ -393,15 +520,13 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Equivalent to specifying <command>SET GEQO='on'</command>
|
||||
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.
|
||||
@ -416,8 +541,10 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
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>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
KSQO
|
||||
@ -427,12 +554,11 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
<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
|
||||
ON
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
@ -443,7 +569,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
Off
|
||||
OFF
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
@ -458,15 +584,13 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Equivalent to specifying <command>SET KSQO='off'</command>.
|
||||
Equivalent to specifying <command>SET KSQO='OFF'</command>.
|
||||
</para>
|
||||
</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.
|
||||
@ -475,28 +599,21 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
<para>
|
||||
The frontend may be initialized by setting the PGKSQO
|
||||
environment variable.
|
||||
<variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
QUERY_LIMIT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the number of rows returned by a query.
|
||||
</para>
|
||||
Sets the maximum number of rows returned by a query.
|
||||
By default, there is no limit to the number of rows
|
||||
returned by a query.
|
||||
|
||||
<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>
|
||||
@ -519,181 +636,61 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
By default, there is no limit to the number of rows
|
||||
returned by a query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
TRANSACTION ISOLATION LEVEL
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the isolation level for the current transaction.
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">value</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the isolation level for the current transaction to
|
||||
'SERIALIZABLE' or 'READ COMMITTED'.
|
||||
SERIALIZABLE means that the current transaction will place a
|
||||
lock on every row read, so later reads in that transaction
|
||||
see the rows unmodified by other transactions.
|
||||
READ COMMITTED means that the current transaction reads only
|
||||
committed rows. READ COMMITTED is the default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
DEFAULT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the isolation level for the current transaction to
|
||||
'READ COMMITTED'.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
CLIENT_ENCODING | NAMES
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte client encoding
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">value</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte client encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
DEFAULT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte client encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
This is only enabled if multi-byte was specified to configure.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
SERVER_ENCODING
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte server encoding
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">value</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte server encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
DEFAULT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the multi-byte server encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
This is only enabled if multi-byte was specified to configure.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
</REFSECT2>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SET-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-SET-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue>SET VARIABLE</returnvalue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</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.
|
||||
<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 the specified variable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</VARIABLELIST>
|
||||
</variablelist>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
</refsect2>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SET-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-SET-1">
|
||||
<refsect1info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect1info>
|
||||
<title>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
<command>SET</command> will modify configuration parameters for variable during
|
||||
a session.
|
||||
</para>
|
||||
@ -707,20 +704,20 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
<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
|
||||
An 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>
|
||||
<refsect2 id="R2-SQL-SET-3">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
The <command>SET <replaceable class="parameter">variable</replaceable></command>
|
||||
statement is a <productname>Postgres</productname> language extension.
|
||||
</para>
|
||||
@ -728,16 +725,16 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
Refer to <command>SHOW</command> and <command>RESET</command> to
|
||||
display or reset the current values.
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</REFSECT1>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SET-2">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-SET-2">
|
||||
<title>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
</title>
|
||||
<para>
|
||||
</para>
|
||||
<programlisting>
|
||||
--Set the style of date to ISO:
|
||||
--
|
||||
SET DATESTYLE TO 'ISO';
|
||||
@ -771,25 +768,25 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
today
|
||||
----------------------
|
||||
1998-03-31 17:41:31+02
|
||||
</ProgramListing>
|
||||
</programlisting>
|
||||
|
||||
</REFSECT1>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SET-3">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-SET-3">
|
||||
<title>
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
</title>
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SET-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-SET-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
There is no
|
||||
<command>SET <replaceable class="parameter">variable</replaceable></command>
|
||||
in <acronym>SQL92</acronym>.
|
||||
@ -804,7 +801,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</REFENTRY>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
Reference in New Issue
Block a user