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>
|
||||
</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
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@ -10,7 +10,7 @@ EXPLAIN
|
||||
EXPLAIN
|
||||
</REFNAME>
|
||||
<REFPURPOSE>
|
||||
Shows statement execution details.
|
||||
Shows statement execution details
|
||||
</REFPURPOSE>
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
@ -64,11 +64,19 @@ Outputs
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
NOTICE: QUERY PLAN:
|
||||
<replaceable>plan</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Explicit query plan from the <productname>Postgres</productname> backend.
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
EXPLAIN
|
||||
@ -77,6 +85,7 @@ EXPLAIN
|
||||
<PARA>
|
||||
Flag sent after query plan is shown.
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
@ -102,6 +111,13 @@ Description
|
||||
Notes
|
||||
</TITLE>
|
||||
<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>
|
||||
|
||||
|
@ -146,7 +146,8 @@ NOTICE: PerformPortalFetch: portal "<REPLACEABLE CLASS="PARAMETER">cursor</REPL
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<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.
|
||||
|
||||
<VARLISTENTRY>
|
||||
@ -293,6 +294,9 @@ Usage
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<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>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-FETCH-4">
|
||||
@ -303,7 +307,7 @@ Compatibility
|
||||
SQL92
|
||||
</TITLE>
|
||||
<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.
|
||||
|
||||
<synopsis>
|
||||
|
@ -15,7 +15,7 @@ Grants access privilege to a user, a group or all users
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
GRANT <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
||||
@ -25,7 +25,7 @@ GRANT <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
||||
|
||||
<REFSECT2 ID="R2-SQL-GRANT-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
@ -147,13 +147,21 @@ representing all users.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-GRANT-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -175,13 +183,14 @@ if it is impossible
|
||||
to give privileges to the specified group or users.
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-GRANT-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
@ -202,7 +211,7 @@ There is no need to GRANT privileges to the creator of
|
||||
|
||||
<REFSECT2 ID="R2-SQL-GRANT-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
@ -235,8 +244,8 @@ Use the <command>psql \z</command> command
|
||||
Currently, to create a GROUP you have to insert
|
||||
data manually into table pg_group as:
|
||||
<programlisting>
|
||||
INSERT INTO pg_group VALUES ('todos');
|
||||
CREATE USER miriam IN GROUP todos;
|
||||
INSERT INTO pg_group VALUES ('todos');
|
||||
CREATE USER miriam IN GROUP todos;
|
||||
</programlisting>
|
||||
Refer to REVOKE statements to revoke access privileges.
|
||||
</tip>
|
||||
@ -249,15 +258,15 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
-- grant insert privilege to all users on table films:
|
||||
--
|
||||
GRANT INSERT ON films TO PUBLIC;
|
||||
-- grant insert privilege to all users on table films:
|
||||
--
|
||||
GRANT INSERT ON films TO PUBLIC;
|
||||
</programlisting>
|
||||
|
||||
<programlisting>
|
||||
-- grant all privileges to user manuel on view kinds:
|
||||
--
|
||||
GRANT ALL ON kinds TO manuel;
|
||||
-- grant all privileges to user manuel on view kinds:
|
||||
--
|
||||
GRANT ALL ON kinds TO manuel;
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -271,13 +280,13 @@ Compatibility
|
||||
|
||||
<REFSECT2 ID="R2-SQL-GRANT-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
The SQL92 syntax for GRANT allows setting privileges
|
||||
The <acronym>SQL92</acronym> syntax for GRANT allows setting privileges
|
||||
for individual columns
|
||||
within a table, and allows setting a privilege to grant
|
||||
the same privileges to others.
|
||||
|
@ -14,7 +14,7 @@ Inserts new rows into a table
|
||||
</REFPURPOSE>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-02</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
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">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
@ -70,33 +70,42 @@ A valid query. Refer to the SELECT statement for a further description
|
||||
|
||||
<REFSECT2 ID="R2-SQL-INSERT-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
INSERT <ReturnValue>oid</ReturnValue> 1
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue>INSERT <replaceable>oid</replaceable></ReturnValue> 1
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
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>
|
||||
<TERM>
|
||||
INSERT 0 <ReturnValue>#</ReturnValue>
|
||||
<ReturnValue>INSERT 0 <replaceable>#</replaceable></ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
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>
|
||||
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
@ -129,45 +138,45 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
--Insert a single row into table films;
|
||||
--(in the second example the column date_prod is omitted
|
||||
--therefore will be stored in it a default value of NULL):
|
||||
--
|
||||
INSERT INTO films VALUES
|
||||
('UA502','Bananas',105,'1971-07-13','Comedy',INTERVAL '82 minute');
|
||||
--Insert a single row into table films;
|
||||
--(in the second example the column date_prod is omitted
|
||||
--therefore will be stored in it a default value of NULL):
|
||||
--
|
||||
INSERT INTO films VALUES
|
||||
('UA502','Bananas',105,'1971-07-13','Comedy',INTERVAL '82 minute');
|
||||
|
||||
INSERT INTO films (code, title, did, date_prod, kind)
|
||||
VALUES ('T_601', 'Yojimbo', 106, DATE '1961-06-16', 'Drama');
|
||||
INSERT INTO films (code, title, did, date_prod, kind)
|
||||
VALUES ('T_601', 'Yojimbo', 106, DATE '1961-06-16', 'Drama');
|
||||
</ProgramListing>
|
||||
|
||||
<ProgramListing>
|
||||
--Insert a single row into table distributors, note that
|
||||
--only column "name" is specified, to the non specified
|
||||
--column "did" will be assigned its default value:
|
||||
--
|
||||
INSERT INTO distributors (name) VALUES ('British Lion');
|
||||
--Insert a single row into table distributors, note that
|
||||
--only column "name" is specified, to the non specified
|
||||
--column "did" will be assigned its default value:
|
||||
--
|
||||
INSERT INTO distributors (name) VALUES ('British Lion');
|
||||
</ProgramListing>
|
||||
|
||||
<ProgramListing>
|
||||
--Insert several rows into table films from table tmp:
|
||||
--
|
||||
INSERT INTO films
|
||||
SELECT * FROM tmp;
|
||||
--Insert several rows into table films from table tmp:
|
||||
--
|
||||
INSERT INTO films
|
||||
SELECT * FROM tmp;
|
||||
</ProgramListing>
|
||||
|
||||
<ProgramListing>
|
||||
--Insert into arrays:
|
||||
--Create an empty 3x3 gameboard for noughts-and-crosses
|
||||
--(all of these queries create the same board attribute)
|
||||
--(Refer to PostgreSQL User's Guide chapter 7 for further
|
||||
--information about arrays).
|
||||
--Insert into arrays:
|
||||
--Create an empty 3x3 gameboard for noughts-and-crosses
|
||||
--(all of these queries create the same board attribute)
|
||||
--(Refer to the <citetitle>PostgreSQL User's Guide</citetitle> for further
|
||||
--information about arrays).
|
||||
|
||||
INSERT INTO tictactoe (game, board[1:3][1:3])
|
||||
VALUES (1,'{{"","",""},{},{"",""}}');
|
||||
INSERT INTO tictactoe (game, board[3][3])
|
||||
VALUES (2,'{}');
|
||||
INSERT INTO tictactoe (game, board)
|
||||
VALUES (3,'{{,,},{,,},{,,}}');
|
||||
INSERT INTO tictactoe (game, board[1:3][1:3])
|
||||
VALUES (1,'{{"","",""},{},{"",""}}');
|
||||
INSERT INTO tictactoe (game, board[3][3])
|
||||
VALUES (2,'{}');
|
||||
INSERT INTO tictactoe (game, board)
|
||||
VALUES (3,'{{,,},{,,},{,,}}');
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -181,7 +190,7 @@ Compatibility
|
||||
|
||||
<REFSECT2 ID="R2-SQL-INSERT-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-23</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
|
@ -15,7 +15,7 @@ Listen for notification on a relation
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
LISTEN <REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE>
|
||||
@ -45,13 +45,20 @@ Table object used for notification.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LISTEN-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -61,6 +68,7 @@ LISTEN
|
||||
<PARA>
|
||||
Message returned upon successful completion of registration.
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
@ -68,7 +76,7 @@ Message returned upon successful completion of registration.
|
||||
|
||||
<REFSECT1 ID="R1-SQL-LISTEN-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
@ -95,15 +103,15 @@ never be processed.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LISTEN-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
</TITLE>
|
||||
<para>
|
||||
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
|
||||
characters long.
|
||||
needs not to be a valid class name but can be any string valid
|
||||
as a name up to 32 characters long.
|
||||
|
||||
<para>
|
||||
A restriction in some previous releases of
|
||||
@ -134,7 +142,6 @@ ASYNC NOTIFY of 'virtual' from backend pid '11239' received
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LISTEN-4">
|
||||
<REFSECT2INFO>
|
||||
@ -144,5 +151,5 @@ Compatibility
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
There is no LISTEN statement in <acronym>SQL92</acronym>.
|
||||
There is no <command>LISTEN</command> in <acronym>SQL92</acronym>.
|
||||
</REFENTRY>
|
||||
|
@ -15,7 +15,7 @@ Dynamically loads an object file
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
<REPLACEABLE CLASS="PARAMETER">
|
||||
@ -47,21 +47,41 @@ Object file for dynamic loading.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOAD-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
LOAD
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<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>
|
||||
|
||||
</REFSECT2>
|
||||
@ -69,7 +89,7 @@ LOAD
|
||||
|
||||
<REFSECT1 ID="R1-SQL-LOAD-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
@ -78,7 +98,7 @@ Description
|
||||
Loads an object (or ".o") file into the
|
||||
<productname>Postgres</productname> backend address space. Once a
|
||||
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>
|
||||
If a file is not loaded using
|
||||
@ -92,7 +112,7 @@ at this time.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOAD-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
@ -101,12 +121,14 @@ Notes
|
||||
Functions in loaded object files should not call functions in other
|
||||
object files loaded through the
|
||||
<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
|
||||
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
|
||||
not able to relocate the calls from the functions in A into
|
||||
the new address space of B. If B is not reloaded, however, there will
|
||||
loaded file <literal>B</literal>.
|
||||
This is because if <literal>B</literal> is reloaded, the Postgres loader is
|
||||
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.
|
||||
|
||||
<para>
|
||||
@ -114,7 +136,7 @@ Object files must be compiled to contain position independent code.
|
||||
For example,
|
||||
on DECstations you must use
|
||||
<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.
|
||||
|
||||
<para>
|
||||
@ -130,9 +152,9 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
--Load the file /usr/postgres/demo/circle.o
|
||||
--
|
||||
LOAD "/usr/postgres/demo/circle.o"
|
||||
--Load the file /usr/postgres/demo/circle.o
|
||||
--
|
||||
LOAD "/usr/postgres/demo/circle.o"
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -146,12 +168,12 @@ Compatibility
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOAD-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
There is no LOAD statement in <acronym>SQL92</acronym>.
|
||||
There is no <command>LOAD</command> in <acronym>SQL92</acronym>.
|
||||
|
||||
</REFENTRY>
|
||||
|
@ -15,10 +15,10 @@ Explicit lock of a table inside a transaction
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
LOCK [TABLE] <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||
LOCK [ TABLE ] <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||
</SYNOPSIS>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOCK-1">
|
||||
@ -44,13 +44,21 @@ Inputs
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOCK-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -69,27 +77,31 @@ ERROR <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>: Table does not exist.
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if table don't exist.
|
||||
Message returned if <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
|
||||
does not exist.
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-LOCK-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<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
|
||||
the case where you want to select some data, then
|
||||
update it inside a transaction.
|
||||
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
|
||||
other user may also read the selected data, and try and do
|
||||
their own update, causing a deadlock while you both wait
|
||||
@ -105,18 +117,26 @@ Description
|
||||
the tables to become available. The only solution to this
|
||||
is for both users to lock tables in the same order, so
|
||||
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">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
LOCK is a PostgreSQL language extension.
|
||||
<command>LOCK</command> is a <productname>Postgres</productname>
|
||||
language extension.
|
||||
<para>
|
||||
LOCK works only inside transactions.
|
||||
<command>LOCK</command> works only inside transactions.
|
||||
|
||||
<note>
|
||||
<title>Bug</title>
|
||||
@ -134,14 +154,14 @@ Usage
|
||||
<PARA>
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
--Explicit locking to prevent deadlock:
|
||||
--
|
||||
BEGIN WORK;
|
||||
LOCK films;
|
||||
SELECT * FROM films;
|
||||
UPDATE films SET len = INTERVAL '100 minute'
|
||||
WHERE len = INTERVAL '117 minute';
|
||||
COMMIT WORK;
|
||||
--Explicit locking to prevent deadlock:
|
||||
--
|
||||
BEGIN WORK;
|
||||
LOCK films;
|
||||
SELECT * FROM films;
|
||||
UPDATE films SET len = INTERVAL '100 minute'
|
||||
WHERE len = INTERVAL '117 minute';
|
||||
COMMIT WORK;
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -151,17 +171,17 @@ Usage
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-LOCK-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
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.
|
||||
|
||||
</REFENTRY>
|
||||
|
@ -15,7 +15,7 @@ Moves cursor position
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
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">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
MOVE allows a user to move cursor position a specified
|
||||
number of rows. MOVE works like the FETCH command, but only
|
||||
positions the cursor and does
|
||||
<command>MOVE</command> allows a user to move cursor position a specified
|
||||
number of rows.
|
||||
<command>MOVE</command> works like the <command>FETCH</command> command,
|
||||
but only positions the cursor and does
|
||||
not return rows.
|
||||
|
||||
<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">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
MOVE is a <productname>Postgres</productname> language extension.
|
||||
<command>MOVE</command> is a <productname>Postgres</productname>
|
||||
language extension.
|
||||
|
||||
<para>
|
||||
Refer to FETCH for a description
|
||||
Refer to <command>FETCH</command> for a description
|
||||
of valid arguments.
|
||||
Refer to DECLARE to declare a cursor.
|
||||
Refer to BEGIN WORK, COMMIT WORK, ROLLBACK WORK statements
|
||||
Refer to <command>DECLARE</command> to declare a cursor.
|
||||
Refer to <command>BEGIN WORK</command>, <command>COMMIT WORK</command>,
|
||||
<command>ROLLBACK WORK</command> statements
|
||||
for further information about transactions.
|
||||
|
||||
</REFSECT2>
|
||||
@ -64,28 +67,31 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
--set up and use a cursor:
|
||||
--
|
||||
BEGIN WORK;
|
||||
DECLARE liahona CURSOR
|
||||
FOR SELECT * FROM films;
|
||||
--set up and use a cursor:
|
||||
--
|
||||
BEGIN WORK;
|
||||
DECLARE liahona CURSOR FOR SELECT * FROM films;
|
||||
|
||||
--Skip first 5 rows:
|
||||
--
|
||||
MOVE FORWARD 5 IN liahona;
|
||||
|
||||
--Fetch 6th row in the cursor liahona:
|
||||
--
|
||||
FETCH 1 IN liahona;
|
||||
|
||||
code |title |did| date_prod|kind |len
|
||||
-----+------+---+----------+----------+------
|
||||
P_303|48 Hrs|103|1982-10-22|Action | 01:37
|
||||
|
||||
-- close the cursor liahona and commit work:
|
||||
--
|
||||
CLOSE liahona;
|
||||
COMMIT WORK;
|
||||
--Skip first 5 rows:
|
||||
--
|
||||
MOVE FORWARD 5 IN liahona;
|
||||
<computeroutput>
|
||||
MOVE
|
||||
</computeroutput>
|
||||
--Fetch 6th row in the cursor liahona:
|
||||
--
|
||||
FETCH 1 IN liahona;
|
||||
<computeroutput>
|
||||
FETCH
|
||||
code |title |did| date_prod|kind |len
|
||||
-----+------+---+----------+----------+------
|
||||
P_303|48 Hrs|103|1982-10-22|Action | 01:37
|
||||
(1 row)
|
||||
</computeroutput>
|
||||
-- close the cursor liahona and commit work:
|
||||
--
|
||||
CLOSE liahona;
|
||||
COMMIT WORK;
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -105,6 +111,9 @@ Compatibility
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
There is no SQL92 MOVE statement. Instead, <acronym>SQL92</acronym> allows
|
||||
one to FETCH rows from an absolute cursor position.
|
||||
There is no SQL92 <command>MOVE</command> statement.
|
||||
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>
|
||||
|
@ -15,7 +15,7 @@ Signals all frontends and backends listening on a class
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
<REPLACEABLE CLASS="PARAMETER">
|
||||
@ -25,13 +25,13 @@ NOTIFY <REPLACEABLE CLASS="PARAMETER">classname</REPLACEABLE>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-NOTIFY-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -47,13 +47,21 @@ Table or arbitrary relation class used for notification.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-NOTIFY-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -63,6 +71,7 @@ NOTIFY
|
||||
<PARA>
|
||||
Notification message from backend.
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
@ -70,29 +79,30 @@ Notification message from backend.
|
||||
|
||||
<REFSECT1 ID="R1-SQL-NOTIFY-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
NOTIFY is used to awaken all backends and consequently all
|
||||
frontends that have executed <command>LISTEN</command> on
|
||||
<replaceable class="parameter">classname</replaceable>.
|
||||
<command>NOTIFY</command> is used to awaken all sessions which have
|
||||
previously executed
|
||||
<command>LISTEN <replaceable class="parameter">classname</replaceable></command>.
|
||||
This can be used either within an instance-level rule
|
||||
as part of the action body or from a normal query.
|
||||
|
||||
<para>
|
||||
When used from within a normal query,
|
||||
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>
|
||||
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
|
||||
of the class (e.g., that it has been updated),
|
||||
nor does the notification protocol transmit any useful information
|
||||
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>
|
||||
in some application-specific way.
|
||||
<para>
|
||||
@ -103,8 +113,8 @@ Therefore, all notify does is indicate that some backend wishes its peers to
|
||||
<para>
|
||||
This event notification is performed through the libpq protocol
|
||||
and frontend application interface. The application program
|
||||
must call the routine <function>PQnotifies</function> in order to find out the
|
||||
name of the class to which a given
|
||||
must call the routine <function>PQnotifies</function>
|
||||
in order to find out the name of the class to which a given
|
||||
notification corresponds.
|
||||
If this code is not included in the application,
|
||||
the event notification will be
|
||||
@ -112,7 +122,7 @@ the event notification will be
|
||||
|
||||
<REFSECT2 ID="R2-SQL-NOTIFY-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
@ -131,12 +141,15 @@ Usage
|
||||
<ProgramListing>
|
||||
-- Configure and execute a listen/notify sequence
|
||||
-- from psql
|
||||
postgres=> create table t (i int4);
|
||||
postgres=> listen t;
|
||||
LISTEN
|
||||
postgres=> notify t;
|
||||
CREATE TABLE t (i int4);
|
||||
<computeroutput>
|
||||
LISTEN t;
|
||||
</computeroutput>
|
||||
NOTIFY t;
|
||||
<computeroutput>
|
||||
NOTIFY
|
||||
ASYNC NOTIFY of 't' from backend pid '10949' received
|
||||
</computeroutput>
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -146,16 +159,16 @@ ASYNC NOTIFY of 't' from backend pid '10949' received
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
|
||||
<REFSECT2 ID="R2-SQL-NOTIFY-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
There is no NOTIFY statement in <acronym>SQL92</acronym>.
|
||||
There is no <command>NOTIFY</command> statement in <acronym>SQL92</acronym>.
|
||||
|
||||
</REFENTRY>
|
||||
|
@ -15,7 +15,7 @@ Restores run-time parameters for session to default values
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||
@ -23,13 +23,13 @@ RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -45,13 +45,20 @@ Inputs
|
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
@ -60,8 +67,11 @@ RESET VARIABLE
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if successfully.
|
||||
Message returned if
|
||||
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is successfully reset
|
||||
to its default value..
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
@ -69,22 +79,24 @@ RESET VARIABLE
|
||||
|
||||
<REFSECT1 ID="R1-SQL-RESET-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
The RESET statement restores variables to the default values.
|
||||
Refer to the SET command for details on allowed values and defaults.
|
||||
RESET is an alternate form for
|
||||
<command>RESET</command> restores variables to the
|
||||
default values.
|
||||
Refer to the <command>SET</command> command for details on
|
||||
allowed values and defaults.
|
||||
<command>RESET</command> is an alternate form for
|
||||
<synopsis>
|
||||
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command>
|
||||
</synopsis>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
@ -103,12 +115,12 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
-- reset DateStyle to its default;
|
||||
RESET DateStyle;
|
||||
-- reset DateStyle to its default;
|
||||
RESET DateStyle;
|
||||
</programlisting>
|
||||
<programlisting>
|
||||
-- reset Geqo to its default;
|
||||
RESET GEQO;
|
||||
-- reset Geqo to its default;
|
||||
RESET GEQO;
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -118,35 +130,15 @@ Usage
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
There is no RESET statement in SQL92.
|
||||
</REFENTRY>
|
||||
There is no <command>RESET</command> in <acronym>SQL92</acronym>.
|
||||
|
||||
<!--
|
||||
<REPLACEABLE CLASS="PARAMETER">
|
||||
</REPLACEABLE>
|
||||
<ReturnValue></ReturnValue>
|
||||
<PARA>
|
||||
</PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>•
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
</VARIABLELIST>
|
||||
<PARA>
|
||||
</PARA>
|
||||
-->
|
||||
</REFENTRY>
|
||||
|
@ -15,7 +15,7 @@ Revokes access privilege from a user, a group or all users.
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
<REPLACEABLE CLASS="PARAMETER">
|
||||
@ -27,13 +27,13 @@ REVOKE <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -89,7 +89,7 @@ RULE
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Privilege to define rules on table/view.
|
||||
(See the <command>CREATE RULE</command> statement).
|
||||
(See <command>CREATE RULE</command>).
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -159,13 +159,20 @@ Rescind the specified privilege(s) for all users.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
@ -186,13 +193,14 @@ ERROR
|
||||
to revoke privileges from a group or users.
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-REVOKE-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
@ -203,7 +211,7 @@ Description
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
@ -249,13 +257,13 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
-- revoke insert privilege from all users on table films:
|
||||
--
|
||||
REVOKE INSERT ON films FROM PUBLIC;
|
||||
-- revoke insert privilege from all users on table films:
|
||||
--
|
||||
REVOKE INSERT ON films FROM PUBLIC;
|
||||
|
||||
-- revoke all privileges from user manuel on view kinds:
|
||||
--
|
||||
REVOKE ALL ON kinds FROM manuel;
|
||||
-- revoke all privileges from user manuel on view kinds:
|
||||
--
|
||||
REVOKE ALL ON kinds FROM manuel;
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -265,7 +273,6 @@ Usage
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-4">
|
||||
<REFSECT2INFO>
|
||||
@ -275,7 +282,8 @@ Compatibility
|
||||
SQL92
|
||||
</TITLE>
|
||||
<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:
|
||||
|
||||
<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
|
||||
keyword.
|
||||
</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>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
ROLLBACK [ WORK ]
|
||||
@ -22,7 +22,7 @@ ROLLBACK [ WORK ]
|
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
@ -34,7 +34,7 @@ None.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
@ -67,18 +67,18 @@ ABORT
|
||||
|
||||
<REFSECT1 ID="R1-SQL-ROLLBACK-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<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.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
@ -87,7 +87,8 @@ Notes
|
||||
The keyword WORK is noise and can be omitted.
|
||||
|
||||
<para>
|
||||
Use the COMMIT statement to successfully terminate a transaction.
|
||||
Use the <command>COMMIT</command> statement to successfully
|
||||
terminate a transaction.
|
||||
|
||||
</REFSECT1>
|
||||
|
||||
@ -97,9 +98,9 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
--To abort all changes:
|
||||
--
|
||||
ROLLBACK WORK;
|
||||
--To abort all changes:
|
||||
--
|
||||
ROLLBACK WORK;
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -113,7 +114,7 @@ Compatibility
|
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
@ -121,23 +122,3 @@ SQL92
|
||||
<PARA>
|
||||
Full compatibility.
|
||||
</REFENTRY>
|
||||
|
||||
<!--
|
||||
<REPLACEABLE CLASS="PARAMETER">
|
||||
</REPLACEABLE>
|
||||
<ReturnValue></ReturnValue>
|
||||
<PARA>
|
||||
</PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>•
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
</VARIABLELIST>
|
||||
<PARA>
|
||||
</PARA>
|
||||
-->
|
||||
|
@ -14,23 +14,23 @@
|
||||
</refpurpose></refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<refsynopsisdivinfo>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
SELECT [ALL|DISTINCT]
|
||||
<replaceable class="PARAMETER">expression</replaceable> [AS <replaceable class="PARAMETER">name</replaceable>] [, ...]
|
||||
[INTO [TABLE] <replaceable class="PARAMETER">intable</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] [, ...] ]
|
||||
<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-SELECT-1">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Inputs
|
||||
@ -66,16 +66,16 @@ SELECT [ALL|DISTINCT]
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">intable</replaceable>
|
||||
<replaceable class="PARAMETER">new_table</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the INTO TABLE clause is specified, the result of the
|
||||
query will be stored in another table with the indicated
|
||||
name.
|
||||
If <replaceable class="PARAMETER">intable</replaceable> does
|
||||
If <replaceable class="PARAMETER">new_table</replaceable> does
|
||||
not exist, it will be created automatically.
|
||||
|
||||
Refer to <command>SELECT INTO</command> for more information.
|
||||
<note>
|
||||
<para>
|
||||
The <command>CREATE TABLE AS</command> statement will also
|
||||
@ -151,11 +151,13 @@ SELECT [ALL|DISTINCT]
|
||||
|
||||
<refsect2 id="R2-SQL-SELECT-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
@ -170,7 +172,15 @@ SELECT [ALL|DISTINCT]
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue>count</returnvalue>
|
||||
<replaceable>status</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue><replaceable>count</replaceable></returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
@ -179,19 +189,21 @@ SELECT [ALL|DISTINCT]
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</variablelist>
|
||||
|
||||
</refsect2>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1 id="R1-SQL-SELECT-1">
|
||||
<refsect1info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect1info>
|
||||
<title>
|
||||
Description
|
||||
</title>
|
||||
<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>
|
||||
|
||||
<para>
|
||||
@ -214,20 +226,21 @@ SELECT [ALL|DISTINCT]
|
||||
|
||||
<para>
|
||||
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">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
WHERE clause
|
||||
WHERE Clause
|
||||
</title>
|
||||
<para>
|
||||
The optional WHERE condition has the general form:
|
||||
|
||||
<synopsis>
|
||||
WHERE <replaceable class="PARAMETER">expr</replaceable> <replaceable class="PARAMETER">cond_op</replaceable> <replaceable class="PARAMETER">expr</replaceable> [<replaceable class="PARAMETER">log_op</replaceable> ...]
|
||||
WHERE <replaceable class="PARAMETER">expr</replaceable> <replaceable class="PARAMETER">cond_op</replaceable> <replaceable class="PARAMETER">expr</replaceable> [ <replaceable class="PARAMETER">log_op</replaceable> ... ]
|
||||
</synopsis>
|
||||
|
||||
where <replaceable class="PARAMETER">cond_op</replaceable> can be
|
||||
@ -243,24 +256,24 @@ WHERE <replaceable class="PARAMETER">expr</replaceable> <replaceable class="PARA
|
||||
|
||||
<refsect2 id="R2-SQL-GROUPBY-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
GROUP BY clause
|
||||
GROUP BY Clause
|
||||
</title>
|
||||
<para>
|
||||
GROUP BY specifies a grouped table derived by the application
|
||||
of the this clause:
|
||||
<synopsis>
|
||||
GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...]
|
||||
GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...]
|
||||
</synopsis></para></refsect2>
|
||||
|
||||
<refsect2 id="R2-SQL-HAVING-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
HAVING clause
|
||||
HAVING Clause
|
||||
</title>
|
||||
<para>
|
||||
The optional HAVING condition has the general form:
|
||||
@ -278,21 +291,22 @@ HAVING <replaceable class="PARAMETER">cond_expr</replaceable>
|
||||
that do not meet the <replaceable class="PARAMETER">cond_expr</replaceable>.</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.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="R2-SQL-ORDERBYCLAUSE-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
ORDER BY clause
|
||||
ORDER BY Clause
|
||||
</title>
|
||||
<para>
|
||||
<synopsis>
|
||||
ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...]
|
||||
ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...]
|
||||
</synopsis></para>
|
||||
|
||||
<para>
|
||||
@ -302,17 +316,18 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
The ordinal numbers refers to the ordinal (left-to-right) position
|
||||
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.
|
||||
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.:
|
||||
<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;
|
||||
</programlisting></para>
|
||||
|
||||
<para>
|
||||
The columns in the ORDER BY must appear in the SELECT clause.
|
||||
Thus the following statement is illegal:
|
||||
<programlisting>
|
||||
SELECT name FROM distributors ORDER BY code;
|
||||
SELECT name FROM distributors ORDER BY code;
|
||||
</programlisting></para>
|
||||
|
||||
<para>
|
||||
@ -323,15 +338,15 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
|
||||
<refsect2 id="R2-SQL-UNION-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
UNION clause
|
||||
UNION Clause
|
||||
</title>
|
||||
<para>
|
||||
<synopsis>
|
||||
<replaceable class="PARAMETER">table_query</replaceable> UNION [ALL] <replaceable class="PARAMETER">table_query</replaceable>
|
||||
[ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...] ]
|
||||
<replaceable class="PARAMETER">table_query</replaceable> UNION [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
|
||||
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||
</synopsis>
|
||||
|
||||
where
|
||||
@ -349,9 +364,10 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
unless the ALL clause is specified.</para>
|
||||
|
||||
<para>
|
||||
Multiple UNION operators in the same SELECT statement are evaluated left to right.
|
||||
Note that the ALL keyword is not global in nature, being applied only for the current pair of
|
||||
table results.</para>
|
||||
Multiple UNION operators in the same SELECT statement are
|
||||
evaluated left to right.
|
||||
Note that the ALL keyword is not global in nature, being
|
||||
applied only for the current pair of table results.</para>
|
||||
|
||||
</refsect2></refsect1>
|
||||
|
||||
@ -364,9 +380,9 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
<literal>distributors</literal>:
|
||||
</para>
|
||||
<programlisting>
|
||||
SELECT f.title, f.did, d.name, f.date_prod, f.kind
|
||||
FROM distributors d, films f
|
||||
WHERE f.did = d.did
|
||||
SELECT f.title, f.did, d.name, f.date_prod, f.kind
|
||||
FROM distributors d, films f
|
||||
WHERE f.did = d.did
|
||||
|
||||
title |did|name | date_prod|kind
|
||||
-------------------------+---+----------------+----------+----------
|
||||
@ -393,7 +409,7 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
the reults by <literal>kind</literal>:
|
||||
</para>
|
||||
<programlisting>
|
||||
SELECT kind, SUM(len) AS total FROM films GROUP BY kind;
|
||||
SELECT kind, SUM(len) AS total FROM films GROUP BY kind;
|
||||
|
||||
kind |total
|
||||
----------+------
|
||||
@ -410,10 +426,10 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
that are less than 5 hours:
|
||||
</para>
|
||||
<programlisting>
|
||||
SELECT kind, SUM(len) AS total
|
||||
FROM films
|
||||
GROUP BY kind
|
||||
HAVING SUM(len) < INTERVAL '5 hour';
|
||||
SELECT kind, SUM(len) AS total
|
||||
FROM films
|
||||
GROUP BY kind
|
||||
HAVING SUM(len) < INTERVAL '5 hour';
|
||||
|
||||
kind |total
|
||||
----------+------
|
||||
@ -426,8 +442,8 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
(<literal>name</literal>):
|
||||
</para>
|
||||
<programlisting>
|
||||
SELECT * FROM distributors ORDER BY name;
|
||||
SELECT * FROM distributors ORDER BY 2;
|
||||
SELECT * FROM distributors ORDER BY name;
|
||||
SELECT * FROM distributors ORDER BY 2;
|
||||
|
||||
did|name
|
||||
---+----------------
|
||||
@ -462,13 +478,13 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
-- 112|Warner Bros. 3|Walter Matthau
|
||||
-- ... ...
|
||||
|
||||
SELECT distributors.name
|
||||
SELECT distributors.name
|
||||
FROM distributors
|
||||
WHERE distributors.name LIKE 'W%'
|
||||
UNION
|
||||
SELECT actors.name
|
||||
FROM actors
|
||||
WHERE actors.name LIKE 'W%'
|
||||
UNION
|
||||
SELECT actors.name
|
||||
FROM actors
|
||||
WHERE actors.name LIKE 'W%'
|
||||
|
||||
name
|
||||
--------------
|
||||
@ -491,7 +507,7 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
|
||||
<refsect2 id="R2-SQL-SELECT-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
<acronym>SQL92</acronym>
|
||||
@ -504,7 +520,7 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
<date>1998-04-15</date>
|
||||
</refsect3info>
|
||||
<title>
|
||||
SELECT clause
|
||||
SELECT Clause
|
||||
</title>
|
||||
<para>
|
||||
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">
|
||||
<refsect3info>
|
||||
<date>1998-09-06</date>
|
||||
<date>1998-09-24</date>
|
||||
</refsect3info>
|
||||
<title>
|
||||
UNION clause
|
||||
UNION Clause
|
||||
</title>
|
||||
<para>
|
||||
The <acronym>SQL92</acronym> syntax for UNION allows an
|
||||
@ -550,6 +566,73 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...
|
||||
</refsect1>
|
||||
</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
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@ -14,7 +14,7 @@ SET
|
||||
</REFPURPOSE>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
<REPLACEABLE CLASS="PARAMETER">
|
||||
@ -26,12 +26,13 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SET-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -210,7 +211,8 @@ set time zone to your local timezone
|
||||
</varlistentry>
|
||||
</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:
|
||||
|
||||
<variablelist>
|
||||
@ -293,12 +295,13 @@ enables the genetic optimizer algorithm
|
||||
for statements with 8 or more tables.
|
||||
<varlistentry>
|
||||
<term>
|
||||
On=#
|
||||
On=<replaceable class="parameter">#</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
enables the genetic optimizer algorithm
|
||||
for statements with # or more tables.
|
||||
Takes an integer argument to enable the genetic optimizer algorithm
|
||||
for statements with <replaceable class="parameter">#</replaceable>
|
||||
or more tables in the query.
|
||||
<varlistentry>
|
||||
<term>
|
||||
Off
|
||||
@ -418,17 +421,25 @@ Equivalent to specifying <command>SET R_PLANS=Off</command>.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SET-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
SET VARIABLE
|
||||
<replaceable>status</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<returnvalue>SET VARIABLE</returnvalue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
@ -436,44 +447,46 @@ Outputs
|
||||
|
||||
<VARLISTENTRY>
|
||||
<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>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
If fails to set variable.
|
||||
If the command fails to set variable.
|
||||
</VARLISTENTRY>
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SET-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
SET will modify configuration parameters for variable during
|
||||
<command>SET</command> will modify configuration parameters for variable during
|
||||
a session.
|
||||
|
||||
<para>
|
||||
Current values can be obtained using SHOW statement, and values
|
||||
can be restored to the defaults using RESET statement.
|
||||
Current values can be obtained using <command>SHOW</command>, and values
|
||||
can be restored to the defaults using <command>RESET</command>.
|
||||
Parameters and values are case-insensitive. Note that the value
|
||||
field is always specified as a string, so is enclosed in
|
||||
single-quotes.
|
||||
<para>
|
||||
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
|
||||
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.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SET-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
@ -483,7 +496,8 @@ The <command>SET <replaceable class="parameter">variable</replaceable></command>
|
||||
statement is a <productname>Postgres</productname> language extension.
|
||||
|
||||
<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>
|
||||
</REFSECT1>
|
||||
@ -495,35 +509,35 @@ Usage
|
||||
<PARA>
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
--Set the style of date to ISO:
|
||||
--
|
||||
SET DATESTYLE TO 'ISO';
|
||||
--Set the style of date to ISO:
|
||||
--
|
||||
SET DATESTYLE TO 'ISO';
|
||||
</programlisting>
|
||||
<programlisting>
|
||||
--Set GEQO to default:
|
||||
--
|
||||
SET GEQO = DEFAULT;
|
||||
--Set GEQO to default:
|
||||
--
|
||||
SET GEQO = DEFAULT;
|
||||
</programlisting>
|
||||
<programlisting>
|
||||
--Turn on right-hand evaluation of plans:
|
||||
--
|
||||
SET R_PLANS TO 'on';
|
||||
--Turn on right-hand evaluation of plans:
|
||||
--
|
||||
SET R_PLANS TO 'on';
|
||||
</programlisting>
|
||||
<programlisting>
|
||||
--set the timezone for Berkeley, California:
|
||||
SET TIME ZONE 'PST8PDT';
|
||||
--set the timezone for Berkeley, California:
|
||||
SET TIME ZONE 'PST8PDT';
|
||||
|
||||
SELECT CURRENT_TIMESTAMP AS today;
|
||||
SELECT CURRENT_TIMESTAMP AS today;
|
||||
|
||||
today
|
||||
----------------------
|
||||
1998-03-31 07:41:21-08
|
||||
</programlisting>
|
||||
<programlisting>
|
||||
--set the timezone for Italy:
|
||||
SET TIME ZONE 'Europe/Rome';
|
||||
--set the timezone for Italy:
|
||||
SET TIME ZONE 'Europe/Rome';
|
||||
|
||||
SELECT CURRENT_TIMESTAMP AS today;
|
||||
SELECT CURRENT_TIMESTAMP AS today;
|
||||
|
||||
today
|
||||
----------------------
|
||||
@ -541,7 +555,7 @@ Compatibility
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SET-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
@ -549,9 +563,10 @@ SQL92
|
||||
<PARA>
|
||||
There is no
|
||||
<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:
|
||||
|
||||
<programlisting>
|
||||
@ -559,23 +574,3 @@ SET TIME ZONE { interval_value_expression | LOCAL }
|
||||
</programlisting>
|
||||
|
||||
</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>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||
@ -22,13 +22,13 @@ SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -36,7 +36,7 @@ Inputs
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Refer to the SET statement for more information on available
|
||||
Refer to <command>SET</command> for more information on available
|
||||
variables.
|
||||
</VARLISTENTRY>
|
||||
</VARIABLELIST>
|
||||
@ -45,70 +45,92 @@ Inputs
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<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
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if successfully.
|
||||
</listitem>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
NOTICE: Unrecognized variable <ReturnValue>value</ReturnValue>
|
||||
<returnvalue>NOTICE: Unrecognized variable <replaceable>value</replaceable></ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if <ReturnValue>value</ReturnValue> does not exist.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
NOTICE: Time zone is unknown
|
||||
SHOW VARIABLE
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
If the TZ environment variable is not set.
|
||||
|
||||
</VARIABLELIST>
|
||||
</VARIABLELIST>
|
||||
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SHOW-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
SHOW will display the current configuration parameters for
|
||||
<command>SHOW</command> will display the current
|
||||
configuration parameters for
|
||||
variable during a session.
|
||||
|
||||
<para>
|
||||
The session can be configured using SET statement, and values
|
||||
can be restored to the defaults using RESET statement.
|
||||
The session can be configured using <command>SET</command> statement,
|
||||
and values
|
||||
can be restored to the defaults using <command>RESET</command> statement.
|
||||
Parameters and values are case-insensitive.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
The SHOW statement is a <productname>Postgres</productname>
|
||||
The <command>SHOW</command> is a <productname>Postgres</productname>
|
||||
language extension.
|
||||
|
||||
<para>
|
||||
Refer to the SET/RESET statements to set/reset variable values.
|
||||
See also the SET TIME ZONE statement.
|
||||
Refer to <command>SET</command>/<command>RESET</command>
|
||||
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>
|
||||
</REFSECT1>
|
||||
|
||||
@ -118,13 +140,13 @@ Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
-- show DateStyle;
|
||||
SHOW DateStyle;
|
||||
NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
|
||||
-- show DateStyle;
|
||||
SHOW DateStyle;
|
||||
NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
|
||||
|
||||
-- show Geqo;
|
||||
SHOW GEQO;
|
||||
NOTICE:GEQO is ON
|
||||
-- show Geqo;
|
||||
SHOW GEQO;
|
||||
NOTICE:GEQO is ON
|
||||
</ProgramListing>
|
||||
|
||||
</REFSECT1>
|
||||
@ -138,13 +160,13 @@ Compatibility
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-08-31</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
There is no SET statement defined in <acronym>SQL92</acronym>.
|
||||
There is no <command>SET</command> defined in <acronym>SQL92</acronym>.
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</REFENTRY>
|
||||
|
@ -15,23 +15,23 @@ Replaces values of columns in a table
|
||||
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
UPDATE <REPLACEABLE CLASS="PARAMETER">table</replaceable> SET <REPLACEABLE CLASS="PARAMETER">column</replaceable> = <REPLACEABLE CLASS="PARAMETER">expression</replaceable> [, ...]
|
||||
[FROM <REPLACEABLE CLASS="PARAMETER">fromlist</REPLACEABLE>]
|
||||
[WHERE <REPLACEABLE CLASS="PARAMETER">condition</REPLACEABLE>]
|
||||
[ FROM <REPLACEABLE CLASS="PARAMETER">fromlist</REPLACEABLE> ]
|
||||
[ WHERE <REPLACEABLE CLASS="PARAMETER">condition</REPLACEABLE> ]
|
||||
</SYNOPSIS>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-UPDATE-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
@ -86,7 +86,7 @@ The name of a column in <REPLACEABLE CLASS="PARAMETER">table</replaceable>.
|
||||
|
||||
<REFSECT2 ID="R2-SQL-UPDATE-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
@ -114,7 +114,7 @@ If <replaceable class="parameter">#</replaceable>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-UPDATE-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
@ -172,7 +172,7 @@ Compatibility
|
||||
|
||||
<REFSECT2 ID="R2-SQL-UPDATE-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-04-15</DATE>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
|
Loading…
x
Reference in New Issue
Block a user