Commit 1ac838ed authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Minor updates for release.

Split reference pages for CREATE TABLE AS and SELECT INTO to allow psgml
 (the emacs parser) to handle parsing.
parent 5e84d58e
......@@ -72,6 +72,7 @@
<!entity createRule system "create_rule.sgml">
<!entity createSequence system "create_sequence.sgml">
<!entity createTable system "create_table.sgml">
<!entity createTableAs system "create_table_as.sgml">
<!entity createTrigger system "create_trigger.sgml">
<!entity createType system "create_type.sgml">
<!entity createUser system "create_user.sgml">
......@@ -104,6 +105,7 @@
<!entity revoke system "revoke.sgml">
<!entity rollback system "rollback.sgml">
<!entity select system "select.sgml">
<!entity selectInto system "select_into.sgml">
<!entity set system "set.sgml">
<!entity show system "show.sgml">
<!entity unlisten system "unlisten.sgml">
......
<REFENTRY ID="SQL-ALTERUSER">
<REFMETA>
<REFENTRYTITLE>
<refentry id="SQL-ALTERUSER">
<refmeta>
<refentrytitle>
ALTER USER
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
ALTER USER
</REFNAME>
<REFPURPOSE>
</refname>
<refpurpose>
Modifies user account information
</REFPURPOSE>
</refpurpose>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-08</DATE>
</REFSYNOPSISDIVINFO>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-08</date>
</refsynopsisdivinfo>
<synopsis>
ALTER USER <replaceable class="PARAMETER">username</replaceable>
[ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
......@@ -26,91 +26,91 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
[ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
</synopsis>
<REFSECT2 ID="R2-SQL-ALTERUSER-1">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-ALTERUSER-1">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Inputs
</TITLE>
<PARA>
</title>
<para>
Refer to <command>CREATE USER</command> for a detailed description of each
clause.
</para>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER"> username </REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
<variablelist>
<varlistentry>
<term>
<replaceable class="PARAMETER"> username </replaceable>
</term>
<listitem>
<para>
The Postgres account name of the user whose details are to be altered.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</para>
</listitem>
</varlistentry>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER"> password </REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
<varlistentry>
<term>
<replaceable class="PARAMETER"> password </replaceable>
</term>
<listitem>
<para>
The new password to be used for this account.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</para>
</listitem>
</varlistentry>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER"> groupname </REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
<varlistentry>
<term>
<replaceable class="PARAMETER"> groupname </replaceable>
</term>
<listitem>
<para>
The name of an access group into which this account is to be put.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</para>
</listitem>
</varlistentry>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER"> abstime </REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
<varlistentry>
<term>
<replaceable class="PARAMETER"> abstime </replaceable>
</term>
<listitem>
<para>
The date (and, optionally, the time)
at which this user's access is to be terminated.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
</REFSECT2>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<REFSECT2 ID="R2-SQL-ALTERUSER-2">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-ALTERUSER-2">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
</title>
<para>
<variablelist>
<varlistentry>
<term>
<returnvalue>ALTER USER</returnvalue>
</TERM>
<LISTITEM>
<PARA>
</term>
<listitem>
<para>
Message returned if the alteration was successful.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</para>
</listitem>
</varlistentry>
<VARLISTENTRY>
<TERM>
<varlistentry>
<term>
<returnvalue>ERROR: alterUser: user "username" does not exist</returnvalue>
</TERM>
<LISTITEM>
<PARA>
</term>
<listitem>
<para>
Error message returned if the user specified doesn't
exist.
</para>
......@@ -118,17 +118,17 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
</varlistentry>
</variablelist>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-ALTERUSER-1">
<REFSECT1INFO>
<DATE>1998-09-08</DATE>
</REFSECT1INFO>
<TITLE>
<refsect1 id="R1-SQL-ALTERUSER-1">
<refsect1info>
<date>1998-09-08</date>
</refsect1info>
<title>
Description
</TITLE>
<PARA>
</title>
<para>
<command>ALTER USER</command> is used to change the attributes of a user's
<productname>Postgres</productname> account.
Please note that it is not possible
......@@ -137,21 +137,21 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
<productname>Postgres</productname>
user or any user with read and modify permissions on
"pg_shadow" to alter user passwords.
</PARA>
</para>
<para>
If any of the clauses of the alter user statement are
omitted, the corresponding value in the "pg_shadow" table
is left unchanged.
</para>
<REFSECT2 ID="R2-SQL-ALTERUSER-3">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-ALTERUSER-3">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Notes
</TITLE>
<PARA>
</title>
<para>
<command>ALTER USER</command> statement
is a <productname>Postgres</productname>
language extension.
......@@ -162,37 +162,37 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
account.
</para>
<para>
In the current release (v6.4), the IN GROUP clause is parsed
In the current release (v6.5), the IN GROUP clause is parsed
but has no affect. When it is fully implemented, it is
intended to modify the pg_group relation.
</para>
</REFSECT2>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-ALTERUSER-2">
<TITLE>
<refsect1 id="R1-SQL-ALTERUSER-2">
<title>
Usage
</TITLE>
<PARA>
</title>
<para>
Change a user password
</PARA>
<ProgramListing>
</para>
<programlisting>
ALTER USER davide WITH PASSWORD hu8jmn3;
</ProgramListing>
</programlisting>
<para>
Change a user's valid until date
</para>
<ProgramListing>
<programlisting>
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
</ProgramListing>
</programlisting>
<para>
Change a user's valid until date, specifying that his
authorisation should expire at midday on 4th May 1998 using
the time zone which is one hour ahead of UTC
</para>
<ProgramListing>
<programlisting>
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
</ProgramListing>
</programlisting>
<para>
Give a user the ability to create other users and new databases.
</para>
......@@ -205,36 +205,36 @@ ALTER USER miriam CREATEUSER CREATEDB;
<programlisting>
ALTER USER miriam IN GROUP sales, payroll;
</programlisting>
</REFSECT1>
</refsect1>
<REFSECT1 ID="R1-SQL-ALTERUSER-3">
<TITLE>
<refsect1 id="R1-SQL-ALTERUSER-3">
<title>
Compatibility
</TITLE>
<PARA>
</PARA>
</title>
<para>
</para>
<REFSECT2 ID="R2-SQL-ALTERUSER-4">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-ALTERUSER-4">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
SQL92
</TITLE>
<PARA>
</title>
<para>
There is no <command>ALTER USER</command> statement in
<acronym>SQL92</acronym>.
The standard leaves
the definition of users to the implementation.
</PARA>
</para>
</refsect2>
</refsect1>
</REFENTRY>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
......
<REFENTRY ID="SQL-BEGINWORK">
<REFMETA>
<REFENTRYTITLE>
BEGIN WORK
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
BEGIN WORK
</REFNAME>
<REFPURPOSE>
<refentry id="SQL-BEGINWORK">
<refmeta>
<refentrytitle id="SQL-BEGINWORK-TITLE">
BEGIN
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
BEGIN
</refname>
<refpurpose>
Begins a transaction in chained mode
</REFPURPOSE>
</refpurpose>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-08</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1999-06-11</date>
</refsynopsisdivinfo>
<synopsis>
BEGIN [ WORK | TRANSACTION ]
</SYNOPSIS>
</synopsis>
<REFSECT2 ID="R2-SQL-BEGINWORK-1">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-BEGINWORK-1">
<refsect2info>
<date>1999-06-11</date>
</refsect2info>
<title>
Inputs
</TITLE>
<PARA>
</title>
<para>
None
</para>
</REFSECT2>
</refsect2>
<REFSECT2 ID="R2-SQL-BEGINWORK-2">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-BEGINWORK-2">
<refsect2info>
<date>1999-06-11</date>
</refsect2info>
<title>
Outputs
</TITLE>
<PARA>
</title>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<returnvalue>BEGIN</returnvalue>
</TERM>
<LISTITEM>
<PARA>
This signifies that a new transaction has been started.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<returnvalue>NOTICE: BeginTransactionBlock and not in default state</returnvalue>
</TERM>
<LISTITEM>
<PARA>
<para>
<variablelist>
<varlistentry>
<term>
<returnvalue>BEGIN</returnvalue>
</term>
<listitem>
<para>
This signifies that a new transaction has been started.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<returnvalue>NOTICE: BeginTransactionBlock and not in default state</returnvalue>
</term>
<listitem>
<para>
This indicates that a transaction was already in progress.
The current transaction is not affected.
</para>
</listitem>
</varlistentry>
</VARIABLELIST>
</variablelist>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-BEGINWORK-1">
<REFSECT1INFO>
<DATE>1998-09-08</DATE>
</REFSECT1INFO>
<TITLE>
<refsect1 id="R1-SQL-BEGINWORK-1">
<refsect1info>
<date>1999-06-11</date>
</refsect1info>
<title>
Description
</TITLE>
</title>
<para>
By default, <productname>Postgres</productname> executes transactions
in unchained mode (also known as autocommit feature in other DBMSes).
in <firstterm>unchained mode</firstterm>
(also known as <quote>autocommit</quote> in other database
systems).
In other words, each user statement is executed in its own transaction
and commit is implicit (if execution was successfull).
and a commit is implicitly performed at the end of the statement
(if execution was successful, otherwise a rollback is done).
<command>BEGIN</command> initiates a user transaction in chained mode,
i.e. all user statements after <command>BEGIN</command> command will
be executed in single transaction untill explicit COMMIT, ROLLBACK
be executed in a single transaction until an explicit COMMIT, ROLLBACK
or execution abort. Statements in chained mode are executed much faster,
because of transaction start/commit requires significant CPU and disk
activity. This mode is also required for consistency when changing
one of related tables.
because transaction start/commit requires significant CPU and disk
activity. Execution of multiple statements inside a transaction
is also required for consistency when changing several
related tables.
</para>
<para>
Default transaction isolation level in <productname>Postgres</productname>
is READ COMMITTED one, when queries inside transaction see only changes
The default transaction isolation level in
<productname>Postgres</productname>
is READ COMMITTED, where queries inside the transaction see only changes
committed before query execution. So, you have to use
<command>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE</command>
command just after BEGIN if you need in better transaction isolation.
In SERIALIZABLE mode queries will see only changes committed before entire
transaction began (actually, before execution of first DML statement
in serializable transaction).
just after BEGIN if you need more rigorous transaction isolation.
In SERIALIZABLE mode queries will see only changes committed before
the entire
transaction began (actually, before execution of the first DML statement
in a serializable transaction).
</para>
<para>
If the transaction is committed, <productname>Postgres</productname>
will ensure either that all updates are done or else that none of
them are done. Transactions have the standard ACID
them are done. Transactions have the standard <acronym>ACID</acronym>
(atomic, consistent, isolatable, and durable) property.
</para>
<REFSECT2 ID="R2-SQL-BEGINWORK-3">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-BEGINWORK-3">
<refsect2info>
<date>1999-06-11</date>
</refsect2info>
<title>
Notes
</TITLE>
<PARA>
</title>
<para>
The keyword TRANSACTION is just a cosmetic alternative to WORK.
Neither keyword need be specified.
</PARA>
</para>
<PARA>
<para>
Refer to the <command>LOCK</command> statement for further information
about locking tables inside a transaction.
</PARA>
</para>
<PARA>
Use <command>COMMIT</command> or <command>ROLLBACK</command>
<para>
Use <xref linkend="SQL-COMMIT-TITLE" endterm="SQL-COMMIT-TITLE">
or
<xref linkend="SQL-ROLLBACK-TITLE" endterm="SQL-ROLLBACK-TITLE">
to terminate a transaction.
</PARA>
</REFSECT2>
</para>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-BEGINWORK-2">
<TITLE>
<refsect1 id="R1-SQL-BEGINWORK-2">
<title>
Usage
</TITLE>
<PARA>To begin a user transaction:
</title>
<ProgramListing>
<para>
To begin a user transaction:
<programlisting>
BEGIN WORK;
</ProgramListing>
</programlisting>
</para>
</REFSECT1>
</refsect1>
<REFSECT1 ID="R1-SQL-BEGINWORK-3">
<TITLE>
<refsect1 id="R1-SQL-BEGINWORK-3">
<title>
Compatibility
</TITLE>
<PARA>
</title>
<para>
<command>BEGIN</command>
is a <productname>Postgres</productname> language extension.
</para>
<REFSECT2 ID="R2-SQL-BEGINWORK-4">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-BEGINWORK-4">
<refsect2info>
<date>1999-06-11</date>
</refsect2info>
<title>
SQL92
</TITLE>
<PARA>
</title>
<para>
There is no explicit BEGIN WORK command in <acronym>SQL92</acronym>;
transaction initiation is always implicit and it terminates either
with a COMMIT or with a ROLLBACK statement.
</PARA>
<PARA>
<acronym>SQL92</acronym> also requires SERIALIZABLE to be default
<note>
<para>
Many relational database systems offer an autocommit feature as a
convenience.
</para>
</note>
</para>
<para>
<acronym>SQL92</acronym> also requires SERIALIZABLE to be the default
transaction isolation level.
</PARA>
</para>
</refsect2>
</refsect1>
</REFENTRY>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
......
......@@ -25,6 +25,7 @@
&createRule;
&createSequence;
&createTable;
&createTableAs;
&createTrigger;
&createType;
&createUser;
......@@ -57,6 +58,7 @@
&revoke;
&rollback;
&select;
&selectInto;
&set;
&show;
&unlisten;
......
<REFENTRY ID="SQL-COMMIT">
<REFMETA>
<REFENTRYTITLE>
<refentry id="SQL-COMMIT">
<refmeta>
<refentrytitle id="SQL-COMMIT-TITLE">
COMMIT
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
COMMIT
</REFNAME>
<REFPURPOSE>
</refname>
<refpurpose>
Commits the current transaction
</REFPURPOSE>
</refpurpose>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-08</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-08</date>
</refsynopsisdivinfo>
<synopsis>
COMMIT [ WORK | TRANSACTION ]
</SYNOPSIS>
</synopsis>
<REFSECT2 ID="R2-SQL-COMMIT-1">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-COMMIT-1">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Inputs
</TITLE>
<PARA>
</title>
<para>
None
</para>
</REFSECT2>
</refsect2>
<REFSECT2 ID="R2-SQL-COMMIT-2">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-COMMIT-2">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Outputs
</TITLE>
<PARA>
</title>
<para>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<returnvalue>END</returnvalue>
</TERM>
<LISTITEM>
<PARA>
Message returned if the transaction is successfully committed.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<returnvalue>NOTICE EndTransactionBlock and not inprogress/abort state</returnvalue>
</TERM>
<LISTITEM>
<PARA>
<variablelist>
<varlistentry>
<term>
<returnvalue>END</returnvalue>
</term>
<listitem>
<para>
Message returned if the transaction is successfully committed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<returnvalue>NOTICE EndTransactionBlock and not inprogress/abort state</returnvalue>
</term>
<listitem>
<para>
If there is no transaction in progress.
</para>
</listitem>
</varlistentry>
</VARIABLELIST>
</variablelist>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-COMMIT-1">
<REFSECT1INFO>
<DATE>1998-09-08</DATE>
</REFSECT1INFO>
<TITLE>
<refsect1 id="R1-SQL-COMMIT-1">
<refsect1info>
<date>1998-09-08</date>
</refsect1info>
<title>
Description
</TITLE>
<PARA>
</title>
<para>
<command>COMMIT</command> commits the current transaction. All
changes made by the transaction become visible to others
and are guaranteed to be durable if a crash occurs.
</PARA>
</para>
<REFSECT2 ID="R2-SQL-COMMIT-3">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-COMMIT-3">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Notes
</TITLE>
<PARA>
</title>
<para>
The keywords WORK and TRANSACTION are noise and can be omitted.
</PARA>
</para>
<para>
Use the <command>ROLLBACK</command> statement to abort a transaction.
Use <xref linkend="SQL-ROLLBACK-TITLE" endterm="SQL-ROLLBACK-TITLE">
to abort a transaction.
</para>
</REFSECT2>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-COMMIT-2">
<TITLE>
<refsect1 id="R1-SQL-COMMIT-2">
<title>
Usage
</TITLE>
<PARA>
To make all changes permanent:
</PARA>
<ProgramListing>
</title>
<para>
To make all changes permanent:
<programlisting>
COMMIT WORK;
</ProgramListing>
</REFSECT1>
</programlisting>
</para>
</refsect1>
<REFSECT1 ID="R1-SQL-COMMIT-3">
<TITLE>
<refsect1 id="R1-SQL-COMMIT-3">
<title>
Compatibility
</TITLE>
<PARA>
</PARA>
</title>
<para>
</para>
<REFSECT2 ID="R2-SQL-COMMIT-4">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-COMMIT-4">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
SQL92
</TITLE>
<PARA>
</title>
<para>
Full compatibility.
</PARA>
</para>
</refsect2>
</refsect1>
</REFENTRY>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
......
This diff is collapsed.
This diff is collapsed.
<refentry id="CREATETABLEAS">
<refmeta>
<refentrytitle>
CREATE TABLE AS
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
CREATE TABLE AS
</refname>
<refpurpose>
Creates a new table
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-22</date>
</refsynopsisdivinfo>
<synopsis>
CREATE TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceable> [, ...] ) ]
AS <replaceable>select_clause</replaceable>
</synopsis>
<refsect2>
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Inputs
</title>
<para>
<variablelist>
<varlistentry>
<term>
<replaceable>table</replaceable>
</term>
<listitem>
<para>
The name of a new table to be created.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable>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>select_clause</replaceable>
</term>
<listitem>
<para>
A valid query statement. Refer to SELECT for a description of the
allowed syntax.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2>
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Outputs
</title>
<para>
Refer to CREATE TABLE and SELECT for a summary of possible output
messages.
</para>
</refsect2>
</refsynopsisdiv>
<refsect1>
<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.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
This diff is collapsed.
......@@ -22,7 +22,8 @@ pg_dump [ <replaceable class="parameter">dbname</replaceable> ]
pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ]
[ -t <replaceable class="parameter">table</replaceable> ]
[ -f <replaceable class="parameter">outputfile</replaceable> ]
[ -a ] [ -c ] [ -d ] [ -D ] [ -n ] [ -N ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
[ -a ] [ -c ] [ -d ] [ -D ] [ -n ] [ -N ]
[ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
[ <replaceable class="parameter">dbname</replaceable> ]
</SYNOPSIS>
......
......@@ -206,7 +206,8 @@ postgres [ -B <replaceable class="parameter">nBuffers</replaceable> ] [ -C ] [ -
"American" format (<literal>MM-DD-YYYY</literal>).
Dates are accepted by the backend in a wide variety of formats,
and for input dates this switch mostly affects the interpretation
for ambiguous cases. See <xref linkend="datatype" endterm="datatype">
for ambiguous cases.
See <xref linkend="datatype-title" endterm="datatype-title">
for more information.
</para>
</listitem>
......
This diff is collapsed.
<REFENTRY ID="SQL-RESET">
<REFMETA>
<REFENTRYTITLE>
RESET
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
RESET
</REFNAME>
<REFPURPOSE>
Restores run-time parameters for session to default values
</REFPURPOSE>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-24</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
</SYNOPSIS>
<refentry id="SQL-RESET">
<refmeta>
<refentrytitle>
RESET
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
RESET
</refname>
<refpurpose>
Restores run-time parameters for session to default values
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-24</date>
</refsynopsisdivinfo>
<synopsis>
RESET <replaceable class="PARAMETER">variable</replaceable>
</synopsis>
<REFSECT2 ID="R2-SQL-RESET-1">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Inputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
Refer to the SET statement for more information on available
variables.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</REFSECT2>
<refsect2 id="R2-SQL-RESET-1">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Inputs
</title>
<para>
<variablelist>
<varlistentry>
<term>
<replaceable class="PARAMETER">variable</replaceable>
</term>
<listitem>
<para>
Refer to the SET statement for more information on available
variables.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<REFSECT2 ID="R2-SQL-RESET-2">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
RESET VARIABLE
</TERM>
<LISTITEM>
<PARA>
Message returned if
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is successfully reset
to its default value..
</para>
</listitem>
</varlistentry>
</VARIABLELIST>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
<refsect2 id="R2-SQL-RESET-2">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term>
RESET VARIABLE
</term>
<listitem>
<para>
Message returned if
<replaceable class="PARAMETER">variable</replaceable> is successfully reset
to its default value..
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-RESET-1">
<REFSECT1INFO>
<DATE>1998-09-24</DATE>
</REFSECT1INFO>
<TITLE>
Description
</TITLE>
<PARA>
<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>
</para>
<refsect1 id="R1-SQL-RESET-1">
<refsect1info>
<date>1998-09-24</date>
</refsect1info>
<title>
Description
</title>
<para>
<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
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command>
</para>
<REFSECT2 ID="R2-SQL-RESET-3">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Notes
</TITLE>
<PARA>
The RESET statement is a <productname>Postgres</productname> language extension.
</para>
<para>
Refer to SET/SHOW statements to set/show variable values.
</para>
</REFSECT2>
</refsect1>
<refsect2 id="R2-SQL-RESET-3">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Notes
</title>
<para>
The RESET statement is a <productname>Postgres</productname>
language extension.
</para>
<para>
Refer to SET/SHOW statements to set/show variable values.
</para>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-RESET-2">
<TITLE>
Usage
</TITLE>
<PARA>
<ProgramListing>
-- reset DateStyle to its default;
RESET DateStyle;
</programlisting>
<programlisting>
-- reset Geqo to its default;
RESET GEQO;
</ProgramListing>
</para>
</REFSECT1>
<refsect1 id="R1-SQL-RESET-2">
<title>
Usage
</title>
<para>
<programlisting>
-- reset DateStyle to its default;
RESET DateStyle;
</programlisting>
<programlisting>
-- reset Geqo to its default;
RESET GEQO;
</programlisting>
</para>
</refsect1>
<refsect1 id="R1-SQL-RESET-3">
<title>
Compatibility
</title>
<REFSECT1 ID="R1-SQL-RESET-3">
<TITLE>
Compatibility
</TITLE>
<refsect2 id="R2-SQL-RESET-4">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
SQL92
</title>
<para>
There is no <command>RESET</command> in <acronym>SQL92</acronym>.
</para>
</refsect2>
</refsect1>
</refentry>
<REFSECT2 ID="R2-SQL-RESET-4">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
SQL92
</TITLE>
<PARA>
There is no <command>RESET</command> in <acronym>SQL92</acronym>.
</para>
</refsect2>
</refsect1>
</REFENTRY>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
This diff is collapsed.
<REFENTRY ID="SQL-ROLLBACK">
<REFMETA>
<REFENTRYTITLE>
<refentry id="SQL-ROLLBACK">
<refmeta>
<refentrytitle id="SQL-ROLLBACK-TITLE">
ROLLBACK
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
ROLLBACK
</REFNAME>
<REFPURPOSE>
Aborts the current transaction
</REFPURPOSE>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-24</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
ROLLBACK [ WORK ]
</SYNOPSIS>
</refname>
<refpurpose>
Aborts the current transaction
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-24</date>
</refsynopsisdivinfo>
<synopsis>
ROLLBACK [ WORK | TRANSACTION ]
</synopsis>
<REFSECT2 ID="R2-SQL-ROLLBACK-1">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Inputs
</TITLE>
<PARA>
None.
</para>
</REFSECT2>
<refsect2 id="R2-SQL-ROLLBACK-1">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Inputs
</title>
<para>
None.
</para>
</refsect2>
<REFSECT2 ID="R2-SQL-ROLLBACK-2">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
ABORT
</TERM>
<LISTITEM>
<PARA>
Message returned if successful.
</para>
</listitem>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
NOTICE: UserAbortTransactionBlock and not in in-progress state
ABORT
</TERM>
<LISTITEM>
<PARA>
If there is not any transaction currently in progress.
</para>
</listitem>
</VARLISTENTRY>
</VARIABLELIST>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
<refsect2 id="R2-SQL-ROLLBACK-2">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term>
ABORT
</term>
<listitem>
<para>
Message returned if successful.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
NOTICE: UserAbortTransactionBlock and not in in-progress state
ABORT
</term>
<listitem>
<para>
If there is not any transaction currently in progress.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-ROLLBACK-1">
<REFSECT1INFO>
<DATE>1998-09-24</DATE>
</REFSECT1INFO>
<TITLE>
Description
</TITLE>
<PARA>
<command>ROLLBACK</command> rolls back the current transaction and causes
all the updates made by the transaction to be discarded.
</para>
<REFSECT2 ID="R2-SQL-ROLLBACK-3">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
Notes
</TITLE>
<PARA>
The keyword WORK is noise and can be omitted.
</para>
<para>
Use the <command>COMMIT</command> statement to successfully
terminate a transaction.
</para>
</refsect2>
</REFSECT1>
<refsect1 id="R1-SQL-ROLLBACK-1">
<refsect1info>
<date>1998-09-24</date>
</refsect1info>
<title>
Description
</title>
<REFSECT1 ID="R1-SQL-ROLLBACK-2">
<TITLE>
Usage
</TITLE>
<PARA>
<ProgramListing>
--To abort all changes:
--
ROLLBACK WORK;
</ProgramListing>
</para>
</REFSECT1>
<REFSECT1 ID="R1-SQL-ROLLBACK-3">
<TITLE>
Compatibility
</TITLE>
<PARA>
</PARA>
<REFSECT2 ID="R2-SQL-ROLLBACK-4">
<REFSECT2INFO>
<DATE>1998-09-24</DATE>
</REFSECT2INFO>
<TITLE>
SQL92
</TITLE>
<PARA>
Full compatibility.
</para>
</refsect2>
</refsect1>
</REFENTRY>
<para>
<command>ROLLBACK</command> rolls back the current transaction and causes
all the updates made by the transaction to be discarded.
</para>
<refsect2 id="R2-SQL-ROLLBACK-3">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Notes
</title>
<para>
The keywords WORK and TRANSACTION are noise and can be omitted.
</para>
<para>
Use <xref linkend="SQL-COMMIT-TITLE" endterm="SQL-COMMIT-TITLE">
to successfully terminate a transaction.
</para>
</refsect2>
</refsect1>
<refsect1 id="R1-SQL-ROLLBACK-2">
<title>
Usage
</title>
<para>
<programlisting>
--To abort all changes:
--
ROLLBACK WORK;
</programlisting>
</para>
</refsect1>
<refsect1 id="R1-SQL-ROLLBACK-3">
<title>
Compatibility
</title>
<para>
</para>
<refsect2 id="R2-SQL-ROLLBACK-4">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
SQL92
</title>
<para>
Full compatibility. TRANSACTION is a
<productname>Postgres</productname> extension.
</para>
</refsect2>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
This diff is collapsed.
<refentry id="SQL-SELECTINTO">
<refmeta>
<refentrytitle>
SELECT INTO
</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 [TEMP] [ 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] | INTERSECT | EXCEPT } <replaceable class="PARAMETER">select</replaceable>]
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
[ FOR UPDATE [OF class_name...]]
[ LIMIT count [OFFSET|, count]]
</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.
</para>
</refsect2>
<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.
</para>
</refsect2>
</refsynopsisdiv>
<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.
</para>
</note>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
......@@ -18,7 +18,8 @@
<date>1998-09-24</date>
</refsynopsisdivinfo>
<synopsis>
SET <replaceable class="PARAMETER">variable</replaceable> { TO | = } { '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
SET <replaceable class="PARAMETER">variable</replaceable> { TO | = } {
'<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
SET TIME ZONE { '<replaceable class="PARAMETER">timezone</replaceable>' | LOCAL | DEFAULT };
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED }
</synopsis>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment