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