mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Cleanup markup and minor editing to prepare for first release.
This commit is contained in:
parent
dcff8232c1
commit
f8b6b5f14f
@ -1663,6 +1663,102 @@ affect a column or a table.
|
|||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
|
||||||
|
<REFENTRY ID="SQL-CREATETABLEAS">
|
||||||
|
<REFMETA>
|
||||||
|
<REFENTRYTITLE>
|
||||||
|
CREATE TABLE
|
||||||
|
</REFENTRYTITLE>
|
||||||
|
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
||||||
|
</REFMETA>
|
||||||
|
<REFNAMEDIV>
|
||||||
|
<REFNAME>
|
||||||
|
CREATE TABLE
|
||||||
|
</REFNAME>
|
||||||
|
<REFPURPOSE>
|
||||||
|
Creates a new table
|
||||||
|
</REFPURPOSE>
|
||||||
|
|
||||||
|
<REFSYNOPSISDIV>
|
||||||
|
<REFSYNOPSISDIVINFO>
|
||||||
|
<DATE>1998-09-22</DATE>
|
||||||
|
</REFSYNOPSISDIVINFO>
|
||||||
|
<SYNOPSIS>
|
||||||
|
CREATE TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> [ ( <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> [, ...] ) ] AS <REPLACEABLE CLASS="PARAMETER">select_clause</REPLACEABLE>
|
||||||
|
</SYNOPSIS>
|
||||||
|
|
||||||
|
<REFSECT2 ID="R2-SQL-CREATETABLEAS-1">
|
||||||
|
<REFSECT2INFO>
|
||||||
|
<DATE>1998-09-22</DATE>
|
||||||
|
</REFSECT2INFO>
|
||||||
|
<TITLE>
|
||||||
|
Inputs
|
||||||
|
</TITLE>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
The name of a new table to be created.
|
||||||
|
</PARA>
|
||||||
|
</LISTITEM>
|
||||||
|
</VARLISTENTRY>
|
||||||
|
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
The name of a column. Multiple column names can be specified using
|
||||||
|
a comma-delimited list of column names.
|
||||||
|
</PARA>
|
||||||
|
</LISTITEM>
|
||||||
|
</VARLISTENTRY>
|
||||||
|
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<REPLACEABLE CLASS="PARAMETER">select_clause</REPLACEABLE>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
A valid query statement. Refer to SELECT for a description of the
|
||||||
|
allowed syntax.
|
||||||
|
</PARA>
|
||||||
|
</LISTITEM>
|
||||||
|
</VARLISTENTRY>
|
||||||
|
</VARIABLELIST>
|
||||||
|
|
||||||
|
<REFSECT2 ID="R2-SQL-CREATETABLEAS-2">
|
||||||
|
<REFSECT2INFO>
|
||||||
|
<DATE>1998-09-22</DATE>
|
||||||
|
</REFSECT2INFO>
|
||||||
|
<TITLE>
|
||||||
|
Outputs
|
||||||
|
</TITLE>
|
||||||
|
<PARA>
|
||||||
|
Refer to CREATE TABLE and SELECT for a summary of possible output
|
||||||
|
messages.
|
||||||
|
|
||||||
|
<REFSECT1 ID="R1-SQL-CREATETABLEAS-1">
|
||||||
|
<REFSECT1INFO>
|
||||||
|
<DATE>1998-09-22</DATE>
|
||||||
|
</REFSECT1INFO>
|
||||||
|
<TITLE>
|
||||||
|
Description
|
||||||
|
</TITLE>
|
||||||
|
<PARA>
|
||||||
|
CREATE TABLE AS enables a table to be created from the contents of
|
||||||
|
an existing table. It has functionality equivalent to SELECT TABLE INTO,
|
||||||
|
but with perhaps a more obvious syntax.
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@ -10,7 +10,7 @@ EXPLAIN
|
|||||||
EXPLAIN
|
EXPLAIN
|
||||||
</REFNAME>
|
</REFNAME>
|
||||||
<REFPURPOSE>
|
<REFPURPOSE>
|
||||||
Shows statement execution details.
|
Shows statement execution details
|
||||||
</REFPURPOSE>
|
</REFPURPOSE>
|
||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
@ -64,11 +64,19 @@ Outputs
|
|||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
NOTICE: QUERY PLAN:
|
NOTICE: QUERY PLAN:
|
||||||
|
<replaceable>plan</replaceable>
|
||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Explicit query plan from the <productname>Postgres</productname> backend.
|
Explicit query plan from the <productname>Postgres</productname> backend.
|
||||||
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
EXPLAIN
|
EXPLAIN
|
||||||
@ -77,6 +85,7 @@ EXPLAIN
|
|||||||
<PARA>
|
<PARA>
|
||||||
Flag sent after query plan is shown.
|
Flag sent after query plan is shown.
|
||||||
|
|
||||||
|
</VARIABLELIST>
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
@ -102,6 +111,13 @@ Description
|
|||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
|
There is only sparse documentation on the optimizer's use of cost
|
||||||
|
information in <productname>Postgres</productname>.
|
||||||
|
General information on cost estimation for query optimization
|
||||||
|
can be found in database textbooks.
|
||||||
|
Refer to the <citetitle>Programmer's Guide</citetitle>
|
||||||
|
in the chapters on indexes and the genetic query optimizer for
|
||||||
|
more information.
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
|
|
||||||
|
@ -146,7 +146,8 @@ NOTICE: PerformPortalFetch: portal "<REPLACEABLE CLASS="PARAMETER">cursor</REPL
|
|||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
If <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE> is not previously declared.
|
If <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
|
||||||
|
is not previously declared.
|
||||||
The cursor must be declared within a transaction block.
|
The cursor must be declared within a transaction block.
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
@ -293,6 +294,9 @@ Usage
|
|||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
|
The non-embedded use of cursors is a <productname>Postgres</productname>
|
||||||
|
extension. The syntax and usage of cursors is being compared
|
||||||
|
against the embedded form of cursors defined in <acronym>SQL92</acronym>.
|
||||||
</PARA>
|
</PARA>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-FETCH-4">
|
<REFSECT2 ID="R2-SQL-FETCH-4">
|
||||||
@ -303,7 +307,7 @@ Compatibility
|
|||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
SQL92 allows absolute positioning of the cursor for
|
<acronym>SQL92</acronym> allows absolute positioning of the cursor for
|
||||||
FETCH, and allows placing the results into explicit variables.
|
FETCH, and allows placing the results into explicit variables.
|
||||||
|
|
||||||
<synopsis>
|
<synopsis>
|
||||||
|
@ -15,7 +15,7 @@ Grants access privilege to a user, a group or all users
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
GRANT <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
GRANT <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
||||||
@ -25,7 +25,7 @@ GRANT <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-GRANT-1">
|
<REFSECT2 ID="R2-SQL-GRANT-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
@ -147,13 +147,21 @@ representing all users.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-GRANT-2">
|
<REFSECT2 ID="R2-SQL-GRANT-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -175,13 +183,14 @@ if it is impossible
|
|||||||
to give privileges to the specified group or users.
|
to give privileges to the specified group or users.
|
||||||
|
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSYNOPSISDIV>
|
</REFSYNOPSISDIV>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-GRANT-1">
|
<REFSECT1 ID="R1-SQL-GRANT-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
@ -202,7 +211,7 @@ There is no need to GRANT privileges to the creator of
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-GRANT-3">
|
<REFSECT2 ID="R2-SQL-GRANT-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
@ -271,13 +280,13 @@ Compatibility
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-GRANT-4">
|
<REFSECT2 ID="R2-SQL-GRANT-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
The SQL92 syntax for GRANT allows setting privileges
|
The <acronym>SQL92</acronym> syntax for GRANT allows setting privileges
|
||||||
for individual columns
|
for individual columns
|
||||||
within a table, and allows setting a privilege to grant
|
within a table, and allows setting a privilege to grant
|
||||||
the same privileges to others.
|
the same privileges to others.
|
||||||
|
@ -14,7 +14,7 @@ Inserts new rows into a table
|
|||||||
</REFPURPOSE>
|
</REFPURPOSE>
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-02</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
INSERT INTO <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> [ ( <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> [, ...] ) ]
|
INSERT INTO <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> [ ( <REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> [, ...] ) ]
|
||||||
@ -23,7 +23,7 @@ INSERT INTO <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> [ ( <REPLACEABLE
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-INSERT-1">
|
<REFSECT2 ID="R2-SQL-INSERT-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
@ -70,33 +70,42 @@ A valid query. Refer to the SELECT statement for a further description
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-INSERT-2">
|
<REFSECT2 ID="R2-SQL-INSERT-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
INSERT <ReturnValue>oid</ReturnValue> 1
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<ReturnValue>INSERT <replaceable>oid</replaceable></ReturnValue> 1
|
||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Message returned if only one row was inserted.
|
Message returned if only one row was inserted.
|
||||||
<ReturnValue>oid</ReturnValue> is the row identifier.
|
<ReturnValue><replaceable>oid</replaceable></ReturnValue>
|
||||||
|
is the row identifier.
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
INSERT 0 <ReturnValue>#</ReturnValue>
|
<ReturnValue>INSERT 0 <replaceable>#</replaceable></ReturnValue>
|
||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Message returned if more than one rows were inserted.
|
Message returned if more than one rows were inserted.
|
||||||
<ReturnValue>#</ReturnValue> is the number of rows inserted.
|
<ReturnValue><replaceable>#</replaceable></ReturnValue>
|
||||||
|
is the number of rows inserted.
|
||||||
|
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSYNOPSISDIV>
|
</REFSYNOPSISDIV>
|
||||||
@ -159,7 +168,7 @@ Usage
|
|||||||
--Insert into arrays:
|
--Insert into arrays:
|
||||||
--Create an empty 3x3 gameboard for noughts-and-crosses
|
--Create an empty 3x3 gameboard for noughts-and-crosses
|
||||||
--(all of these queries create the same board attribute)
|
--(all of these queries create the same board attribute)
|
||||||
--(Refer to PostgreSQL User's Guide chapter 7 for further
|
--(Refer to the <citetitle>PostgreSQL User's Guide</citetitle> for further
|
||||||
--information about arrays).
|
--information about arrays).
|
||||||
|
|
||||||
INSERT INTO tictactoe (game, board[1:3][1:3])
|
INSERT INTO tictactoe (game, board[1:3][1:3])
|
||||||
@ -181,7 +190,7 @@ Compatibility
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-INSERT-4">
|
<REFSECT2 ID="R2-SQL-INSERT-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-23</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
|
@ -15,7 +15,7 @@ Listen for notification on a relation
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
LISTEN <REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE>
|
LISTEN <REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE>
|
||||||
@ -45,13 +45,20 @@ Table object used for notification.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LISTEN-2">
|
<REFSECT2 ID="R2-SQL-LISTEN-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -61,6 +68,7 @@ LISTEN
|
|||||||
<PARA>
|
<PARA>
|
||||||
Message returned upon successful completion of registration.
|
Message returned upon successful completion of registration.
|
||||||
|
|
||||||
|
</VARIABLELIST>
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
@ -68,7 +76,7 @@ Message returned upon successful completion of registration.
|
|||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-LISTEN-1">
|
<REFSECT1 ID="R1-SQL-LISTEN-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
@ -95,15 +103,15 @@ never be processed.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LISTEN-3">
|
<REFSECT2 ID="R2-SQL-LISTEN-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<para>
|
<para>
|
||||||
Note that <REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE>
|
Note that <REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE>
|
||||||
needs not to be a valid class name but can be any string valid as a name up to 32
|
needs not to be a valid class name but can be any string valid
|
||||||
characters long.
|
as a name up to 32 characters long.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
A restriction in some previous releases of
|
A restriction in some previous releases of
|
||||||
@ -134,7 +142,6 @@ ASYNC NOTIFY of 'virtual' from backend pid '11239' received
|
|||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LISTEN-4">
|
<REFSECT2 ID="R2-SQL-LISTEN-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
@ -144,5 +151,5 @@ Compatibility
|
|||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
There is no LISTEN statement in <acronym>SQL92</acronym>.
|
There is no <command>LISTEN</command> in <acronym>SQL92</acronym>.
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
@ -15,7 +15,7 @@ Dynamically loads an object file
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
<REPLACEABLE CLASS="PARAMETER">
|
||||||
@ -47,21 +47,41 @@ Object file for dynamic loading.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LOAD-2">
|
<REFSECT2 ID="R2-SQL-LOAD-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
LOAD
|
<replaceable>status</replaceable>
|
||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<returnvalue>LOAD</returnvalue>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
Message returned on successful completion.
|
||||||
|
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<returnvalue>ERROR: LOAD: could not open file '<REPLACEABLE CLASS="PARAMETER">filename</REPLACEABLE>'</returnvalue>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
Message returned if the specified file is not found. The file must be visible
|
||||||
|
<emphasis>to the <productname>Postgres</productname> backend</emphasis>,
|
||||||
|
with the appropriate full path name specified, to avoid this message.
|
||||||
|
|
||||||
|
</VARIABLELIST>
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
@ -69,7 +89,7 @@ LOAD
|
|||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-LOAD-1">
|
<REFSECT1 ID="R1-SQL-LOAD-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
@ -78,7 +98,7 @@ Description
|
|||||||
Loads an object (or ".o") file into the
|
Loads an object (or ".o") file into the
|
||||||
<productname>Postgres</productname> backend address space. Once a
|
<productname>Postgres</productname> backend address space. Once a
|
||||||
file is loaded, all functions in that file can be accessed. This
|
file is loaded, all functions in that file can be accessed. This
|
||||||
function is used in support of ADT's.
|
function is used in support of user-defined types and functions.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If a file is not loaded using
|
If a file is not loaded using
|
||||||
@ -92,7 +112,7 @@ at this time.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LOAD-3">
|
<REFSECT2 ID="R2-SQL-LOAD-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
@ -101,12 +121,14 @@ Notes
|
|||||||
Functions in loaded object files should not call functions in other
|
Functions in loaded object files should not call functions in other
|
||||||
object files loaded through the
|
object files loaded through the
|
||||||
<command>LOAD</command>
|
<command>LOAD</command>
|
||||||
command, meaning, for example, that all functions in file A should
|
command. For example, all functions in file <literal>A</literal> should
|
||||||
call each other, functions in the standard or math libraries, or in
|
call each other, functions in the standard or math libraries, or in
|
||||||
Postgres itself. They should not call functions defined in a different
|
Postgres itself. They should not call functions defined in a different
|
||||||
loaded file B. This is because if B is reloaded, the Postgres loader is
|
loaded file <literal>B</literal>.
|
||||||
not able to relocate the calls from the functions in A into
|
This is because if <literal>B</literal> is reloaded, the Postgres loader is
|
||||||
the new address space of B. If B is not reloaded, however, there will
|
not able to relocate the calls from the functions in <literal>A</literal> into
|
||||||
|
the new address space of <literal>B</literal>.
|
||||||
|
If <literal>B</literal> is not reloaded, however, there will
|
||||||
not be a problem.
|
not be a problem.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -114,7 +136,7 @@ Object files must be compiled to contain position independent code.
|
|||||||
For example,
|
For example,
|
||||||
on DECstations you must use
|
on DECstations you must use
|
||||||
<application>/bin/cc</application>
|
<application>/bin/cc</application>
|
||||||
with the "-G 0" option when compiling object files to be
|
with the <literal>-G 0</literal> option when compiling object files to be
|
||||||
loaded.
|
loaded.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -146,12 +168,12 @@ Compatibility
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LOAD-4">
|
<REFSECT2 ID="R2-SQL-LOAD-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
There is no LOAD statement in <acronym>SQL92</acronym>.
|
There is no <command>LOAD</command> in <acronym>SQL92</acronym>.
|
||||||
|
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
@ -15,7 +15,7 @@ Explicit lock of a table inside a transaction
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
LOCK [ TABLE ] <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
LOCK [ TABLE ] <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||||
@ -44,13 +44,21 @@ Inputs
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LOCK-2">
|
<REFSECT2 ID="R2-SQL-LOCK-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -69,27 +77,31 @@ ERROR <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>: Table does not exist.
|
|||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Message returned if table don't exist.
|
Message returned if <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||||
|
does not exist.
|
||||||
|
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSYNOPSISDIV>
|
</REFSYNOPSISDIV>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-LOCK-1">
|
<REFSECT1 ID="R1-SQL-LOCK-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
The LOCK statement locks in exclusive mode a table inside
|
<command>LOCK</command> locks in exclusive mode a table inside
|
||||||
a transaction. The classic use for this is
|
a transaction. The classic use for this is
|
||||||
the case where you want to select some data, then
|
the case where you want to select some data, then
|
||||||
update it inside a transaction.
|
update it inside a transaction.
|
||||||
If you don't explicit lock a table using LOCK statement, it will be
|
If you don't explicit lock a table using LOCK statement, it will be
|
||||||
implicit locked only at first UPDATE, INSERT or DELETE operation.
|
implicit locked only at the first
|
||||||
|
<command>UPDATE</command>, <command>INSERT</command>,
|
||||||
|
or <command>DELETE</command> operation.
|
||||||
If you don't exclusive lock the table before the select, some
|
If you don't exclusive lock the table before the select, some
|
||||||
other user may also read the selected data, and try and do
|
other user may also read the selected data, and try and do
|
||||||
their own update, causing a deadlock while you both wait
|
their own update, causing a deadlock while you both wait
|
||||||
@ -106,17 +118,25 @@ Description
|
|||||||
is for both users to lock tables in the same order, so
|
is for both users to lock tables in the same order, so
|
||||||
user's lock acquisitions and requests to not form a deadlock.
|
user's lock acquisitions and requests to not form a deadlock.
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
<productname>Postgres</productname> does detect deadlocks and will
|
||||||
|
rollback transactions to resolve the deadlock. Usually, at least one
|
||||||
|
of the deadlocked transactions will complete successfully.
|
||||||
|
</note>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LOCK-3">
|
<REFSECT2 ID="R2-SQL-LOCK-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
LOCK is a PostgreSQL language extension.
|
<command>LOCK</command> is a <productname>Postgres</productname>
|
||||||
|
language extension.
|
||||||
<para>
|
<para>
|
||||||
LOCK works only inside transactions.
|
<command>LOCK</command> works only inside transactions.
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<title>Bug</title>
|
<title>Bug</title>
|
||||||
@ -151,17 +171,17 @@ Usage
|
|||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-LOCK-4">
|
<REFSECT2 ID="R2-SQL-LOCK-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
There is no <command>LOCK TABLE</command> in <acronym>SQL92</acronym>,
|
There is no <command>LOCK TABLE</command> in <acronym>SQL92</acronym>,
|
||||||
it uses SET TRANSACTION to specify
|
which instead uses <command>SET TRANSACTION</command> to specify
|
||||||
concurrency level on transactions.
|
concurrency level on transactions.
|
||||||
|
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
@ -15,7 +15,7 @@ Moves cursor position
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
MOVE [ <REPLACEABLE CLASS="PARAMETER">selector</REPLACEABLE> ] [ <REPLACEABLE CLASS="PARAMETER">count</REPLACEABLE> ]
|
MOVE [ <REPLACEABLE CLASS="PARAMETER">selector</REPLACEABLE> ] [ <REPLACEABLE CLASS="PARAMETER">count</REPLACEABLE> ]
|
||||||
@ -25,35 +25,38 @@ FETCH [ RELATIVE ] [ { [ <REPLACEABLE CLASS="PARAMETER">#</REPLACEABLE> | ALL |
|
|||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-MOVE-1">
|
<REFSECT1 ID="R1-SQL-MOVE-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
MOVE allows a user to move cursor position a specified
|
<command>MOVE</command> allows a user to move cursor position a specified
|
||||||
number of rows. MOVE works like the FETCH command, but only
|
number of rows.
|
||||||
positions the cursor and does
|
<command>MOVE</command> works like the <command>FETCH</command> command,
|
||||||
|
but only positions the cursor and does
|
||||||
not return rows.
|
not return rows.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Refer to the FETCH command for details on syntax and usage.
|
Refer to the <command>FETCH</command> command for details on syntax and usage.
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-MOVE-3">
|
<REFSECT2 ID="R2-SQL-MOVE-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
MOVE is a <productname>Postgres</productname> language extension.
|
<command>MOVE</command> is a <productname>Postgres</productname>
|
||||||
|
language extension.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Refer to FETCH for a description
|
Refer to <command>FETCH</command> for a description
|
||||||
of valid arguments.
|
of valid arguments.
|
||||||
Refer to DECLARE to declare a cursor.
|
Refer to <command>DECLARE</command> to declare a cursor.
|
||||||
Refer to BEGIN WORK, COMMIT WORK, ROLLBACK WORK statements
|
Refer to <command>BEGIN WORK</command>, <command>COMMIT WORK</command>,
|
||||||
|
<command>ROLLBACK WORK</command> statements
|
||||||
for further information about transactions.
|
for further information about transactions.
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
@ -67,21 +70,24 @@ Usage
|
|||||||
--set up and use a cursor:
|
--set up and use a cursor:
|
||||||
--
|
--
|
||||||
BEGIN WORK;
|
BEGIN WORK;
|
||||||
DECLARE liahona CURSOR
|
DECLARE liahona CURSOR FOR SELECT * FROM films;
|
||||||
FOR SELECT * FROM films;
|
|
||||||
|
|
||||||
--Skip first 5 rows:
|
--Skip first 5 rows:
|
||||||
--
|
--
|
||||||
MOVE FORWARD 5 IN liahona;
|
MOVE FORWARD 5 IN liahona;
|
||||||
|
<computeroutput>
|
||||||
|
MOVE
|
||||||
|
</computeroutput>
|
||||||
--Fetch 6th row in the cursor liahona:
|
--Fetch 6th row in the cursor liahona:
|
||||||
--
|
--
|
||||||
FETCH 1 IN liahona;
|
FETCH 1 IN liahona;
|
||||||
|
<computeroutput>
|
||||||
|
FETCH
|
||||||
code |title |did| date_prod|kind |len
|
code |title |did| date_prod|kind |len
|
||||||
-----+------+---+----------+----------+------
|
-----+------+---+----------+----------+------
|
||||||
P_303|48 Hrs|103|1982-10-22|Action | 01:37
|
P_303|48 Hrs|103|1982-10-22|Action | 01:37
|
||||||
|
(1 row)
|
||||||
|
</computeroutput>
|
||||||
-- close the cursor liahona and commit work:
|
-- close the cursor liahona and commit work:
|
||||||
--
|
--
|
||||||
CLOSE liahona;
|
CLOSE liahona;
|
||||||
@ -105,6 +111,9 @@ Compatibility
|
|||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
There is no SQL92 MOVE statement. Instead, <acronym>SQL92</acronym> allows
|
There is no SQL92 <command>MOVE</command> statement.
|
||||||
one to FETCH rows from an absolute cursor position.
|
Instead, <acronym>SQL92</acronym> allows
|
||||||
|
one to <command>FETCH</command> rows from an absolute cursor position,
|
||||||
|
implicitly moving the cursor to the correct place.
|
||||||
|
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
@ -15,7 +15,7 @@ Signals all frontends and backends listening on a class
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
<REPLACEABLE CLASS="PARAMETER">
|
||||||
@ -25,13 +25,13 @@ NOTIFY <REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE>
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-NOTIFY-1">
|
<REFSECT2 ID="R2-SQL-NOTIFY-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -47,13 +47,21 @@ Table or arbitrary relation class used for notification.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-NOTIFY-2">
|
<REFSECT2 ID="R2-SQL-NOTIFY-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -63,6 +71,7 @@ NOTIFY
|
|||||||
<PARA>
|
<PARA>
|
||||||
Notification message from backend.
|
Notification message from backend.
|
||||||
|
|
||||||
|
</VARIABLELIST>
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
@ -70,29 +79,30 @@ Notification message from backend.
|
|||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-NOTIFY-1">
|
<REFSECT1 ID="R1-SQL-NOTIFY-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
NOTIFY is used to awaken all backends and consequently all
|
<command>NOTIFY</command> is used to awaken all sessions which have
|
||||||
frontends that have executed <command>LISTEN</command> on
|
previously executed
|
||||||
<replaceable class="parameter">classname</replaceable>.
|
<command>LISTEN <replaceable class="parameter">classname</replaceable></command>.
|
||||||
This can be used either within an instance-level rule
|
This can be used either within an instance-level rule
|
||||||
as part of the action body or from a normal query.
|
as part of the action body or from a normal query.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When used from within a normal query,
|
When used from within a normal query,
|
||||||
this can be thought of as interprocess communication (IPC). When
|
this can be thought of as interprocess communication (IPC). When
|
||||||
used from within a rule, this can be thought of as an alerter mechanism.
|
used from within a rule, this can be thought of as an alert mechanism.
|
||||||
<para>
|
<para>
|
||||||
Notice that the mere fact that a notify has been
|
Note that the mere fact that a <command>NOTIFY</command> has been
|
||||||
executed does not imply anything in particular about the state
|
executed does not imply anything in particular about the state
|
||||||
of the class (e.g., that it has been updated),
|
of the class (e.g., that it has been updated),
|
||||||
nor does the notification protocol transmit any useful information
|
nor does the notification protocol transmit any useful information
|
||||||
other than the class name.
|
other than the class name.
|
||||||
Therefore, all notify does is indicate that some backend wishes its peers to
|
Therefore, all <command>NOTIFY</command> does is indicate that some backend
|
||||||
|
wishes its peers to
|
||||||
examine <replaceable class="parameter">classname</replaceable>
|
examine <replaceable class="parameter">classname</replaceable>
|
||||||
in some application-specific way.
|
in some application-specific way.
|
||||||
<para>
|
<para>
|
||||||
@ -103,8 +113,8 @@ Therefore, all notify does is indicate that some backend wishes its peers to
|
|||||||
<para>
|
<para>
|
||||||
This event notification is performed through the libpq protocol
|
This event notification is performed through the libpq protocol
|
||||||
and frontend application interface. The application program
|
and frontend application interface. The application program
|
||||||
must call the routine <function>PQnotifies</function> in order to find out the
|
must call the routine <function>PQnotifies</function>
|
||||||
name of the class to which a given
|
in order to find out the name of the class to which a given
|
||||||
notification corresponds.
|
notification corresponds.
|
||||||
If this code is not included in the application,
|
If this code is not included in the application,
|
||||||
the event notification will be
|
the event notification will be
|
||||||
@ -112,7 +122,7 @@ the event notification will be
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-NOTIFY-3">
|
<REFSECT2 ID="R2-SQL-NOTIFY-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
@ -131,12 +141,15 @@ Usage
|
|||||||
<ProgramListing>
|
<ProgramListing>
|
||||||
-- Configure and execute a listen/notify sequence
|
-- Configure and execute a listen/notify sequence
|
||||||
-- from psql
|
-- from psql
|
||||||
postgres=> create table t (i int4);
|
CREATE TABLE t (i int4);
|
||||||
postgres=> listen t;
|
<computeroutput>
|
||||||
LISTEN
|
LISTEN t;
|
||||||
postgres=> notify t;
|
</computeroutput>
|
||||||
|
NOTIFY t;
|
||||||
|
<computeroutput>
|
||||||
NOTIFY
|
NOTIFY
|
||||||
ASYNC NOTIFY of 't' from backend pid '10949' received
|
ASYNC NOTIFY of 't' from backend pid '10949' received
|
||||||
|
</computeroutput>
|
||||||
</ProgramListing>
|
</ProgramListing>
|
||||||
|
|
||||||
</REFSECT1>
|
</REFSECT1>
|
||||||
@ -146,16 +159,16 @@ ASYNC NOTIFY of 't' from backend pid '10949' received
|
|||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-NOTIFY-4">
|
<REFSECT2 ID="R2-SQL-NOTIFY-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
There is no NOTIFY statement in <acronym>SQL92</acronym>.
|
There is no <command>NOTIFY</command> statement in <acronym>SQL92</acronym>.
|
||||||
|
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
@ -15,7 +15,7 @@ Restores run-time parameters for session to default values
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||||
@ -23,13 +23,13 @@ RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-1">
|
<REFSECT2 ID="R2-SQL-RESET-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -45,13 +45,20 @@ Inputs
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-2">
|
<REFSECT2 ID="R2-SQL-RESET-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
@ -60,8 +67,11 @@ RESET VARIABLE
|
|||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Message returned if successfully.
|
Message returned if
|
||||||
|
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is successfully reset
|
||||||
|
to its default value..
|
||||||
|
|
||||||
|
</VARIABLELIST>
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
@ -69,22 +79,24 @@ RESET VARIABLE
|
|||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-RESET-1">
|
<REFSECT1 ID="R1-SQL-RESET-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
The RESET statement restores variables to the default values.
|
<command>RESET</command> restores variables to the
|
||||||
Refer to the SET command for details on allowed values and defaults.
|
default values.
|
||||||
RESET is an alternate form for
|
Refer to the <command>SET</command> command for details on
|
||||||
|
allowed values and defaults.
|
||||||
|
<command>RESET</command> is an alternate form for
|
||||||
<synopsis>
|
<synopsis>
|
||||||
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command>
|
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-3">
|
<REFSECT2 ID="R2-SQL-RESET-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
@ -118,35 +130,15 @@ Usage
|
|||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-4">
|
<REFSECT2 ID="R2-SQL-RESET-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
There is no RESET statement in SQL92.
|
There is no <command>RESET</command> in <acronym>SQL92</acronym>.
|
||||||
</REFENTRY>
|
|
||||||
|
|
||||||
<!--
|
</REFENTRY>
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
|
||||||
</REPLACEABLE>
|
|
||||||
<ReturnValue></ReturnValue>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>•
|
|
||||||
</TERM>
|
|
||||||
<LISTITEM>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
</LISTITEM>
|
|
||||||
</VARLISTENTRY>
|
|
||||||
</VARIABLELIST>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
-->
|
|
||||||
|
@ -15,7 +15,7 @@ Revokes access privilege from a user, a group or all users.
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
<REPLACEABLE CLASS="PARAMETER">
|
||||||
@ -27,13 +27,13 @@ REVOKE <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-REVOKE-1">
|
<REFSECT2 ID="R2-SQL-REVOKE-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -89,7 +89,7 @@ RULE
|
|||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Privilege to define rules on table/view.
|
Privilege to define rules on table/view.
|
||||||
(See the <command>CREATE RULE</command> statement).
|
(See <command>CREATE RULE</command>).
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -159,13 +159,20 @@ Rescind the specified privilege(s) for all users.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-REVOKE-2">
|
<REFSECT2 ID="R2-SQL-REVOKE-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
@ -186,13 +193,14 @@ ERROR
|
|||||||
to revoke privileges from a group or users.
|
to revoke privileges from a group or users.
|
||||||
|
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSYNOPSISDIV>
|
</REFSYNOPSISDIV>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-REVOKE-1">
|
<REFSECT1 ID="R1-SQL-REVOKE-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
@ -203,7 +211,7 @@ Description
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-REVOKE-3">
|
<REFSECT2 ID="R2-SQL-REVOKE-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
@ -265,7 +273,6 @@ Usage
|
|||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-REVOKE-4">
|
<REFSECT2 ID="R2-SQL-REVOKE-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
@ -275,7 +282,8 @@ Compatibility
|
|||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
The SQL92 syntax for REVOKE has additional capabilities for rescinding
|
The SQL92 syntax for <command>REVOKE</command>
|
||||||
|
has additional capabilities for rescinding
|
||||||
privileges, including those on individual columns in tables:
|
privileges, including those on individual columns in tables:
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
@ -328,23 +336,3 @@ If user1 gives a privilege WITH GRANT OPTION to user2,
|
|||||||
this privilege it fails if he/she specify the RESTRICT
|
this privilege it fails if he/she specify the RESTRICT
|
||||||
keyword.
|
keyword.
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
|
||||||
<!--
|
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
|
||||||
</REPLACEABLE>
|
|
||||||
<ReturnValue></ReturnValue>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>•
|
|
||||||
</TERM>
|
|
||||||
<LISTITEM>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
</LISTITEM>
|
|
||||||
</VARLISTENTRY>
|
|
||||||
</VARIABLELIST>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
-->
|
|
||||||
|
@ -14,7 +14,7 @@ Aborts the current transaction
|
|||||||
</REFPURPOSE>
|
</REFPURPOSE>
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
ROLLBACK [ WORK ]
|
ROLLBACK [ WORK ]
|
||||||
@ -22,7 +22,7 @@ ROLLBACK [ WORK ]
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ROLLBACK-1">
|
<REFSECT2 ID="R2-SQL-ROLLBACK-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-09-01</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
@ -34,7 +34,7 @@ None.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ROLLBACK-2">
|
<REFSECT2 ID="R2-SQL-ROLLBACK-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
@ -67,18 +67,18 @@ ABORT
|
|||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-ROLLBACK-1">
|
<REFSECT1 ID="R1-SQL-ROLLBACK-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
ROLLBACK rolls back the current transaction and causes
|
<command>ROLLBACK</command> rolls back the current transaction and causes
|
||||||
all the updates made by the transaction to be discarded.
|
all the updates made by the transaction to be discarded.
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ROLLBACK-3">
|
<REFSECT2 ID="R2-SQL-ROLLBACK-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
@ -87,7 +87,8 @@ Notes
|
|||||||
The keyword WORK is noise and can be omitted.
|
The keyword WORK is noise and can be omitted.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Use the COMMIT statement to successfully terminate a transaction.
|
Use the <command>COMMIT</command> statement to successfully
|
||||||
|
terminate a transaction.
|
||||||
|
|
||||||
</REFSECT1>
|
</REFSECT1>
|
||||||
|
|
||||||
@ -113,7 +114,7 @@ Compatibility
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ROLLBACK-4">
|
<REFSECT2 ID="R2-SQL-ROLLBACK-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
@ -121,23 +122,3 @@ SQL92
|
|||||||
<PARA>
|
<PARA>
|
||||||
Full compatibility.
|
Full compatibility.
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
|
||||||
<!--
|
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
|
||||||
</REPLACEABLE>
|
|
||||||
<ReturnValue></ReturnValue>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>•
|
|
||||||
</TERM>
|
|
||||||
<LISTITEM>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
</LISTITEM>
|
|
||||||
</VARLISTENTRY>
|
|
||||||
</VARIABLELIST>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
-->
|
|
||||||
|
@ -14,12 +14,12 @@
|
|||||||
</refpurpose></refnamediv>
|
</refpurpose></refnamediv>
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<refsynopsisdivinfo>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SELECT [ALL|DISTINCT]
|
SELECT [ALL|DISTINCT]
|
||||||
<replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">name</replaceable> ] [, ...]
|
<replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">name</replaceable> ] [, ...]
|
||||||
[INTO [TABLE] <replaceable class="PARAMETER">intable</replaceable>]
|
[ INTO [TABLE] <replaceable class="PARAMETER">new_table</replaceable> ]
|
||||||
[ FROM <replaceable class="PARAMETER">table</replaceable> [<replaceable class="PARAMETER">alias</replaceable> ] [, ...] ]
|
[ FROM <replaceable class="PARAMETER">table</replaceable> [<replaceable class="PARAMETER">alias</replaceable> ] [, ...] ]
|
||||||
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
|
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
|
||||||
[ GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...] ]
|
[ GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...] ]
|
||||||
@ -30,7 +30,7 @@ SELECT [ALL|DISTINCT]
|
|||||||
|
|
||||||
<refsect2 id="R2-SQL-SELECT-1">
|
<refsect2 id="R2-SQL-SELECT-1">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
@ -66,16 +66,16 @@ SELECT [ALL|DISTINCT]
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<replaceable class="PARAMETER">intable</replaceable>
|
<replaceable class="PARAMETER">new_table</replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
If the INTO TABLE clause is specified, the result of the
|
If the INTO TABLE clause is specified, the result of the
|
||||||
query will be stored in another table with the indicated
|
query will be stored in another table with the indicated
|
||||||
name.
|
name.
|
||||||
If <replaceable class="PARAMETER">intable</replaceable> does
|
If <replaceable class="PARAMETER">new_table</replaceable> does
|
||||||
not exist, it will be created automatically.
|
not exist, it will be created automatically.
|
||||||
|
Refer to <command>SELECT INTO</command> for more information.
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
The <command>CREATE TABLE AS</command> statement will also
|
The <command>CREATE TABLE AS</command> statement will also
|
||||||
@ -151,11 +151,13 @@ SELECT [ALL|DISTINCT]
|
|||||||
|
|
||||||
<refsect2 id="R2-SQL-SELECT-2">
|
<refsect2 id="R2-SQL-SELECT-2">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</title>
|
</title>
|
||||||
|
<para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
@ -170,7 +172,15 @@ SELECT [ALL|DISTINCT]
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<returnvalue>count</returnvalue>
|
<replaceable>status</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<returnvalue><replaceable>count</replaceable></returnvalue>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
@ -179,19 +189,21 @@ SELECT [ALL|DISTINCT]
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SELECT-1">
|
<refsect1 id="R1-SQL-SELECT-1">
|
||||||
<refsect1info>
|
<refsect1info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect1info>
|
</refsect1info>
|
||||||
<title>
|
<title>
|
||||||
Description
|
Description
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
SELECT will get all rows which satisfy the WHERE condition
|
<command>SELECT</command> will get all rows which satisfy the
|
||||||
|
WHERE condition
|
||||||
or all rows of a table if WHERE is omitted.</para>
|
or all rows of a table if WHERE is omitted.</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -214,14 +226,15 @@ SELECT [ALL|DISTINCT]
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
You must have SELECT privilege to a table to read its values
|
You must have SELECT privilege to a table to read its values
|
||||||
(See GRANT/REVOKE statements).</para>
|
(See <command>GRANT</command>/<command>REVOKE</command> statements).
|
||||||
|
</para>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-WHERE-2">
|
<refsect2 id="R2-SQL-WHERE-2">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
WHERE clause
|
WHERE Clause
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
The optional WHERE condition has the general form:
|
The optional WHERE condition has the general form:
|
||||||
@ -243,10 +256,10 @@ WHERE <replaceable class="PARAMETER">expr</replaceable> <replaceable class="PARA
|
|||||||
|
|
||||||
<refsect2 id="R2-SQL-GROUPBY-2">
|
<refsect2 id="R2-SQL-GROUPBY-2">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
GROUP BY clause
|
GROUP BY Clause
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
GROUP BY specifies a grouped table derived by the application
|
GROUP BY specifies a grouped table derived by the application
|
||||||
@ -257,10 +270,10 @@ WHERE <replaceable class="PARAMETER">expr</replaceable> <replaceable class="PARA
|
|||||||
|
|
||||||
<refsect2 id="R2-SQL-HAVING-2">
|
<refsect2 id="R2-SQL-HAVING-2">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
HAVING clause
|
HAVING Clause
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
The optional HAVING condition has the general form:
|
The optional HAVING condition has the general form:
|
||||||
@ -278,17 +291,18 @@ HAVING <replaceable class="PARAMETER">cond_expr</replaceable>
|
|||||||
that do not meet the <replaceable class="PARAMETER">cond_expr</replaceable>.</para>
|
that do not meet the <replaceable class="PARAMETER">cond_expr</replaceable>.</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Each column referenced in <replaceable class="PARAMETER">cond_expr</replaceable> shall unambiguously
|
Each column referenced in
|
||||||
|
<replaceable class="PARAMETER">cond_expr</replaceable> shall unambiguously
|
||||||
reference a grouping column.
|
reference a grouping column.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-ORDERBYCLAUSE-2">
|
<refsect2 id="R2-SQL-ORDERBYCLAUSE-2">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
ORDER BY clause
|
ORDER BY Clause
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
@ -302,7 +316,8 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
|||||||
The ordinal numbers refers to the ordinal (left-to-right) position
|
The ordinal numbers refers to the ordinal (left-to-right) position
|
||||||
of the column. This feature makes it possible to define an ordering
|
of the column. This feature makes it possible to define an ordering
|
||||||
on the basis of a column that does not have a proper name.
|
on the basis of a column that does not have a proper name.
|
||||||
This is never absolutely necessary because it is always possible assign a name
|
This is never absolutely necessary because it is always possible
|
||||||
|
assign a name
|
||||||
to a calculated column using the AS clause, e.g.:
|
to a calculated column using the AS clause, e.g.:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SELECT title, date_prod + 1 AS newlen FROM films ORDER BY newlen;
|
SELECT title, date_prod + 1 AS newlen FROM films ORDER BY newlen;
|
||||||
@ -323,10 +338,10 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
|||||||
|
|
||||||
<refsect2 id="R2-SQL-UNION-2">
|
<refsect2 id="R2-SQL-UNION-2">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
UNION clause
|
UNION Clause
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
@ -349,9 +364,10 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
|||||||
unless the ALL clause is specified.</para>
|
unless the ALL clause is specified.</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Multiple UNION operators in the same SELECT statement are evaluated left to right.
|
Multiple UNION operators in the same SELECT statement are
|
||||||
Note that the ALL keyword is not global in nature, being applied only for the current pair of
|
evaluated left to right.
|
||||||
table results.</para>
|
Note that the ALL keyword is not global in nature, being
|
||||||
|
applied only for the current pair of table results.</para>
|
||||||
|
|
||||||
</refsect2></refsect1>
|
</refsect2></refsect1>
|
||||||
|
|
||||||
@ -491,7 +507,7 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
|||||||
|
|
||||||
<refsect2 id="R2-SQL-SELECT-4">
|
<refsect2 id="R2-SQL-SELECT-4">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect2info>
|
</refsect2info>
|
||||||
<title>
|
<title>
|
||||||
<acronym>SQL92</acronym>
|
<acronym>SQL92</acronym>
|
||||||
@ -504,7 +520,7 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
|||||||
<date>1998-04-15</date>
|
<date>1998-04-15</date>
|
||||||
</refsect3info>
|
</refsect3info>
|
||||||
<title>
|
<title>
|
||||||
SELECT clause
|
SELECT Clause
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
In the <acronym>SQL92</acronym> standard, the optional keyword "AS"
|
In the <acronym>SQL92</acronym> standard, the optional keyword "AS"
|
||||||
@ -526,10 +542,10 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
|||||||
|
|
||||||
<refsect3 id="R3-SQL-UNION-1">
|
<refsect3 id="R3-SQL-UNION-1">
|
||||||
<refsect3info>
|
<refsect3info>
|
||||||
<date>1998-09-06</date>
|
<date>1998-09-24</date>
|
||||||
</refsect3info>
|
</refsect3info>
|
||||||
<title>
|
<title>
|
||||||
UNION clause
|
UNION Clause
|
||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
The <acronym>SQL92</acronym> syntax for UNION allows an
|
The <acronym>SQL92</acronym> syntax for UNION allows an
|
||||||
@ -550,6 +566,73 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
|||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
<refentry id="SQL-SELECTINTO">
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>
|
||||||
|
SELECT
|
||||||
|
</refentrytitle>
|
||||||
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
|
</refmeta>
|
||||||
|
<refnamediv>
|
||||||
|
<refname>
|
||||||
|
SELECT INTO
|
||||||
|
</refname>
|
||||||
|
<refpurpose>
|
||||||
|
Create a new table from an existing table or view
|
||||||
|
</refpurpose></refnamediv>
|
||||||
|
<refsynopsisdiv>
|
||||||
|
<refsynopsisdivinfo>
|
||||||
|
<date>1998-09-22</date>
|
||||||
|
</refsynopsisdivinfo>
|
||||||
|
<synopsis>
|
||||||
|
SELECT [ ALL | DISTINCT ] <replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">name</replaceable> ] [, ...]
|
||||||
|
INTO [ TABLE ] <replaceable class="PARAMETER">new_table</replaceable> ]
|
||||||
|
[ FROM <replaceable class="PARAMETER">table</replaceable> [<replaceable class="PARAMETER">alias</replaceable>] [, ...] ]
|
||||||
|
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
|
||||||
|
[ GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...] ]
|
||||||
|
[ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
|
||||||
|
[ UNION [ ALL ] <replaceable class="PARAMETER">select</replaceable>]
|
||||||
|
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||||
|
</synopsis>
|
||||||
|
|
||||||
|
<refsect2 id="R2-SQL-SELECTINTO-1">
|
||||||
|
<refsect2info>
|
||||||
|
<date>1998-09-22</date>
|
||||||
|
</refsect2info>
|
||||||
|
<title>
|
||||||
|
Inputs
|
||||||
|
</title>
|
||||||
|
<para>
|
||||||
|
All input fields are described in detail for SELECT.
|
||||||
|
|
||||||
|
<refsect2 id="R2-SQL-SELECTINTO-2">
|
||||||
|
<refsect2info>
|
||||||
|
<date>1998-09-22</date>
|
||||||
|
</refsect2info>
|
||||||
|
<title>
|
||||||
|
Outputs
|
||||||
|
</title>
|
||||||
|
<para>
|
||||||
|
All output fields are described in detail for SELECT.
|
||||||
|
|
||||||
|
<refsect1 id="R1-SQL-SELECTINTO-1">
|
||||||
|
<refsect1info>
|
||||||
|
<date>1998-09-22</date>
|
||||||
|
</refsect1info>
|
||||||
|
<title>
|
||||||
|
Description
|
||||||
|
</title>
|
||||||
|
<para>
|
||||||
|
SELECT INTO creates a new table from the results of a query. Typically, this
|
||||||
|
query draws data from an existing table, but any SQL query is allowed.
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
CREATE TABLE AS is functionally equivalent to the SELECT INTO command.
|
||||||
|
</note>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@ -14,7 +14,7 @@ SET
|
|||||||
</REFPURPOSE>
|
</REFPURPOSE>
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
<REPLACEABLE CLASS="PARAMETER">
|
||||||
@ -26,12 +26,13 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SET-1">
|
<REFSECT2 ID="R2-SQL-SET-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -210,7 +211,8 @@ set time zone to your local timezone
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
There are also several internal or optimization parameters which can be specified
|
There are also several internal or optimization
|
||||||
|
parameters which can be specified
|
||||||
by the <command>SET</command> command:
|
by the <command>SET</command> command:
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
@ -293,12 +295,13 @@ enables the genetic optimizer algorithm
|
|||||||
for statements with 8 or more tables.
|
for statements with 8 or more tables.
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
On=#
|
On=<replaceable class="parameter">#</replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
enables the genetic optimizer algorithm
|
Takes an integer argument to enable the genetic optimizer algorithm
|
||||||
for statements with # or more tables.
|
for statements with <replaceable class="parameter">#</replaceable>
|
||||||
|
or more tables in the query.
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
Off
|
Off
|
||||||
@ -418,17 +421,25 @@ Equivalent to specifying <command>SET R_PLANS=Off</command>.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SET-2">
|
<REFSECT2 ID="R2-SQL-SET-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
SET VARIABLE
|
<replaceable>status</replaceable>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<returnvalue>SET VARIABLE</returnvalue>
|
||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
@ -436,44 +447,46 @@ Outputs
|
|||||||
|
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
WARN: Bad value for <replaceable class="parameter">variable</replaceable> (<replaceable class="parameter">value</replaceable>)
|
<returnvalue>WARN: Bad value for <replaceable class="parameter">variable</replaceable> (<replaceable class="parameter">value</replaceable>)</returnvalue>
|
||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
If fails to set variable.
|
If the command fails to set variable.
|
||||||
</VARLISTENTRY>
|
</VARLISTENTRY>
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSYNOPSISDIV>
|
</REFSYNOPSISDIV>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-SET-1">
|
<REFSECT1 ID="R1-SQL-SET-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
SET will modify configuration parameters for variable during
|
<command>SET</command> will modify configuration parameters for variable during
|
||||||
a session.
|
a session.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Current values can be obtained using SHOW statement, and values
|
Current values can be obtained using <command>SHOW</command>, and values
|
||||||
can be restored to the defaults using RESET statement.
|
can be restored to the defaults using <command>RESET</command>.
|
||||||
Parameters and values are case-insensitive. Note that the value
|
Parameters and values are case-insensitive. Note that the value
|
||||||
field is always specified as a string, so is enclosed in
|
field is always specified as a string, so is enclosed in
|
||||||
single-quotes.
|
single-quotes.
|
||||||
<para>
|
<para>
|
||||||
SET TIME ZONE changes the session's default time zone offset.
|
<command>SET TIME ZONE</command> changes the session's
|
||||||
|
default time zone offset.
|
||||||
A SQL-session always begins with an initial default time zone
|
A SQL-session always begins with an initial default time zone
|
||||||
offset.
|
offset.
|
||||||
The SET TIME ZONE statement is used to change the default
|
The <command>SET TIME ZONE</command> statement is used to change the default
|
||||||
time zone offset for the current SQL session.
|
time zone offset for the current SQL session.
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SET-3">
|
<REFSECT2 ID="R2-SQL-SET-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
@ -483,7 +496,8 @@ The <command>SET <replaceable class="parameter">variable</replaceable></command>
|
|||||||
statement is a <productname>Postgres</productname> language extension.
|
statement is a <productname>Postgres</productname> language extension.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Refer to SHOW/RESET statements to show/reset variable values.
|
Refer to <command>SHOW</command> and <command>RESET</command> to
|
||||||
|
display or reset the current values.
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSECT1>
|
</REFSECT1>
|
||||||
@ -541,7 +555,7 @@ Compatibility
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SET-4">
|
<REFSECT2 ID="R2-SQL-SET-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
@ -549,9 +563,10 @@ SQL92
|
|||||||
<PARA>
|
<PARA>
|
||||||
There is no
|
There is no
|
||||||
<command>SET <replaceable class="parameter">variable</replaceable></command>
|
<command>SET <replaceable class="parameter">variable</replaceable></command>
|
||||||
in SQL92.
|
in <acronym>SQL92</acronym>.
|
||||||
|
|
||||||
The SQL92 syntax for SET TIME ZONE is slightly different,
|
The <acronym>SQL92</acronym> syntax for <command>SET TIME ZONE</command>
|
||||||
|
is slightly different,
|
||||||
allowing only a single integer value for time zone specification:
|
allowing only a single integer value for time zone specification:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@ -559,23 +574,3 @@ SET TIME ZONE { interval_value_expression | LOCAL }
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
|
||||||
<!--
|
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
|
||||||
</REPLACEABLE>
|
|
||||||
<ReturnValue></ReturnValue>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>•
|
|
||||||
</TERM>
|
|
||||||
<LISTITEM>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
</LISTITEM>
|
|
||||||
</VARLISTENTRY>
|
|
||||||
</VARIABLELIST>
|
|
||||||
<PARA>
|
|
||||||
</PARA>
|
|
||||||
-->
|
|
||||||
|
@ -14,7 +14,7 @@ Shows run-time parameters for session
|
|||||||
</REFPURPOSE>
|
</REFPURPOSE>
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||||
@ -22,13 +22,13 @@ SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SHOW-1">
|
<REFSECT2 ID="R2-SQL-SHOW-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -36,7 +36,7 @@ Inputs
|
|||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Refer to the SET statement for more information on available
|
Refer to <command>SET</command> for more information on available
|
||||||
variables.
|
variables.
|
||||||
</VARLISTENTRY>
|
</VARLISTENTRY>
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
@ -45,70 +45,92 @@ Inputs
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SHOW-2">
|
<REFSECT2 ID="R2-SQL-SHOW-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
NOTICE: <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is <ReturnValue>value</ReturnValue>
|
<REPLACEABLE>status</REPLACEABLE>
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
|
||||||
|
<VARIABLELIST>
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
<returnvalue>NOTICE: <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is <replaceable>value</replaceable></ReturnValue>
|
||||||
SHOW VARIABLE
|
SHOW VARIABLE
|
||||||
</TERM>
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Message returned if successfully.
|
Message returned if successfully.
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
NOTICE: Unrecognized variable <ReturnValue>value</ReturnValue>
|
<returnvalue>NOTICE: Unrecognized variable <replaceable>value</replaceable></ReturnValue>
|
||||||
|
</TERM>
|
||||||
<LISTITEM>
|
<LISTITEM>
|
||||||
<PARA>
|
<PARA>
|
||||||
Message returned if <ReturnValue>value</ReturnValue> does not exist.
|
Message returned if <ReturnValue>value</ReturnValue> does not exist.
|
||||||
</PARA>
|
</PARA>
|
||||||
</LISTITEM>
|
</LISTITEM>
|
||||||
</VARLISTENTRY>
|
</VARLISTENTRY>
|
||||||
|
|
||||||
|
<VARLISTENTRY>
|
||||||
|
<TERM>
|
||||||
|
NOTICE: Time zone is unknown
|
||||||
|
SHOW VARIABLE
|
||||||
|
</TERM>
|
||||||
|
<LISTITEM>
|
||||||
|
<PARA>
|
||||||
|
If the TZ environment variable is not set.
|
||||||
|
|
||||||
</VARIABLELIST>
|
</VARIABLELIST>
|
||||||
|
</VARIABLELIST>
|
||||||
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSYNOPSISDIV>
|
</REFSYNOPSISDIV>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-SHOW-1">
|
<REFSECT1 ID="R1-SQL-SHOW-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
SHOW will display the current configuration parameters for
|
<command>SHOW</command> will display the current
|
||||||
|
configuration parameters for
|
||||||
variable during a session.
|
variable during a session.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The session can be configured using SET statement, and values
|
The session can be configured using <command>SET</command> statement,
|
||||||
can be restored to the defaults using RESET statement.
|
and values
|
||||||
|
can be restored to the defaults using <command>RESET</command> statement.
|
||||||
Parameters and values are case-insensitive.
|
Parameters and values are case-insensitive.
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SHOW-3">
|
<REFSECT2 ID="R2-SQL-SHOW-3">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
The SHOW statement is a <productname>Postgres</productname>
|
The <command>SHOW</command> is a <productname>Postgres</productname>
|
||||||
language extension.
|
language extension.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Refer to the SET/RESET statements to set/reset variable values.
|
Refer to <command>SET</command>/<command>RESET</command>
|
||||||
See also the SET TIME ZONE statement.
|
to set/reset variable values.
|
||||||
|
See also <command>SET TIME ZONE</command>.
|
||||||
|
|
||||||
<para>
|
|
||||||
If the TZ environment variable is not set the SHOW TIME ZONE statement
|
|
||||||
gives the message: Time zone is unknown
|
|
||||||
</REFSECT2>
|
</REFSECT2>
|
||||||
</REFSECT1>
|
</REFSECT1>
|
||||||
|
|
||||||
@ -138,13 +160,13 @@ Compatibility
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SHOW-4">
|
<REFSECT2 ID="R2-SQL-SHOW-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-08-31</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
There is no SET statement defined in <acronym>SQL92</acronym>.
|
There is no <command>SET</command> defined in <acronym>SQL92</acronym>.
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</REFENTRY>
|
</REFENTRY>
|
||||||
|
@ -15,7 +15,7 @@ Replaces values of columns in a table
|
|||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<REFSYNOPSISDIV>
|
||||||
<REFSYNOPSISDIVINFO>
|
<REFSYNOPSISDIVINFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSYNOPSISDIVINFO>
|
</REFSYNOPSISDIVINFO>
|
||||||
<SYNOPSIS>
|
<SYNOPSIS>
|
||||||
UPDATE <REPLACEABLE CLASS="PARAMETER">table</replaceable> SET <REPLACEABLE CLASS="PARAMETER">column</replaceable> = <REPLACEABLE CLASS="PARAMETER">expression</replaceable> [, ...]
|
UPDATE <REPLACEABLE CLASS="PARAMETER">table</replaceable> SET <REPLACEABLE CLASS="PARAMETER">column</replaceable> = <REPLACEABLE CLASS="PARAMETER">expression</replaceable> [, ...]
|
||||||
@ -25,13 +25,13 @@ UPDATE <REPLACEABLE CLASS="PARAMETER">table</replaceable> SET <REPLACEABLE CLASS
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-UPDATE-1">
|
<REFSECT2 ID="R2-SQL-UPDATE-1">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>
|
<PARA>
|
||||||
</PARA>
|
|
||||||
<VARIABLELIST>
|
<VARIABLELIST>
|
||||||
<VARLISTENTRY>
|
<VARLISTENTRY>
|
||||||
<TERM>
|
<TERM>
|
||||||
@ -86,7 +86,7 @@ The name of a column in <REPLACEABLE CLASS="PARAMETER">table</replaceable>.
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-UPDATE-2">
|
<REFSECT2 ID="R2-SQL-UPDATE-2">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Outputs
|
Outputs
|
||||||
@ -114,7 +114,7 @@ If <replaceable class="parameter">#</replaceable>
|
|||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-UPDATE-1">
|
<REFSECT1 ID="R1-SQL-UPDATE-1">
|
||||||
<REFSECT1INFO>
|
<REFSECT1INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT1INFO>
|
</REFSECT1INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
Description
|
Description
|
||||||
@ -172,7 +172,7 @@ Compatibility
|
|||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-UPDATE-4">
|
<REFSECT2 ID="R2-SQL-UPDATE-4">
|
||||||
<REFSECT2INFO>
|
<REFSECT2INFO>
|
||||||
<DATE>1998-04-15</DATE>
|
<DATE>1998-09-24</DATE>
|
||||||
</REFSECT2INFO>
|
</REFSECT2INFO>
|
||||||
<TITLE>
|
<TITLE>
|
||||||
SQL92
|
SQL92
|
||||||
|
Loading…
x
Reference in New Issue
Block a user