mirror of https://github.com/postgres/postgres
Minor updates for release.
Split reference pages for CREATE TABLE AS and SELECT INTO to allow psgml (the emacs parser) to handle parsing.
This commit is contained in:
parent
5e84d58e70
commit
1ac838edba
|
@ -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">
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<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
|
||||
|
|
|
@ -1,180 +1,201 @@
|
|||
<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>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>To begin a user transaction:
|
||||
|
||||
<ProgramListing>
|
||||
<refsect1 id="R1-SQL-BEGINWORK-2">
|
||||
<title>
|
||||
Usage
|
||||
</title>
|
||||
|
||||
<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;
|
||||
|
|
|
@ -1,141 +1,142 @@
|
|||
<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>
|
||||
The keywords WORK and TRANSACTION are noise and can be omitted.
|
||||
</PARA>
|
||||
</title>
|
||||
<para>
|
||||
Use the <command>ROLLBACK</command> statement to abort a transaction.
|
||||
The keywords WORK and TRANSACTION are noise and can be omitted.
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-COMMIT-2">
|
||||
<TITLE>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
To make all changes permanent:
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
COMMIT WORK;
|
||||
</ProgramListing>
|
||||
</REFSECT1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-COMMIT-3">
|
||||
<TITLE>
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-COMMIT-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-08</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
Full compatibility.
|
||||
</PARA>
|
||||
<para>
|
||||
Use <xref linkend="SQL-ROLLBACK-TITLE" endterm="SQL-ROLLBACK-TITLE">
|
||||
to abort a transaction.
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</REFENTRY>
|
||||
|
||||
<refsect1 id="R1-SQL-COMMIT-2">
|
||||
<title>
|
||||
Usage
|
||||
</title>
|
||||
<para>
|
||||
To make all changes permanent:
|
||||
<programlisting>
|
||||
COMMIT WORK;
|
||||
</programlisting>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="R1-SQL-COMMIT-3">
|
||||
<title>
|
||||
Compatibility
|
||||
</title>
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<refsect2 id="R2-SQL-COMMIT-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-08</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
SQL92
|
||||
</title>
|
||||
<para>
|
||||
Full compatibility.
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</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
|
||||
|
|
|
@ -1,173 +1,173 @@
|
|||
<REFENTRY ID="SQL-CREATEFUNCTION">
|
||||
<REFMETA>
|
||||
<REFENTRYTITLE>
|
||||
<refentry id="SQL-CREATEFUNCTION">
|
||||
<refmeta>
|
||||
<refentrytitle>
|
||||
CREATE FUNCTION
|
||||
</REFENTRYTITLE>
|
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
||||
</REFMETA>
|
||||
<REFNAMEDIV>
|
||||
<REFNAME>
|
||||
</refentrytitle>
|
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>
|
||||
CREATE FUNCTION
|
||||
</REFNAME>
|
||||
<REFPURPOSE>
|
||||
</refname>
|
||||
<refpurpose>
|
||||
Defines a new function
|
||||
</REFPURPOSE>
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-09</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
<refsynopsisdiv>
|
||||
<refsynopsisdivinfo>
|
||||
<date>1998-09-09</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">ftype</replaceable> [, ...] ] )
|
||||
RETURNS <replaceable class="parameter">rtype</replaceable>
|
||||
AS <replaceable class="parameter">definition</replaceable>
|
||||
LANGUAGE '<replaceable class="parameter">langname</replaceable>'
|
||||
</SYNOPSIS>
|
||||
</synopsis>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-09</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEFUNCTION-1">
|
||||
<refsect2info>
|
||||
<date>1998-09-09</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
</title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">name</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a function to create.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">ftype</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The data type of function arguments.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">rtype</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The return data type.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">definition</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string defining the function; the meaning depends on the language.
|
||||
It may be an internal function name, the path to an object file,
|
||||
an SQL query, or text in a procedural language.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="parameter">langname</replaceable>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
may be '<literal>C</literal>', '<literal>sql</literal>',
|
||||
'<literal>internal</literal>'
|
||||
or '<replaceable class="parameter">plname</replaceable>',
|
||||
where '<replaceable class="parameter">plname</replaceable>'
|
||||
is the name of a created procedural
|
||||
language. See <command>CREATE LANGUAGE</command> for details.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</refsect2>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-09</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEFUNCTION-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-09</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue>CREATE</ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue>CREATE</returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This is returned if the command completes successfully.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</VARIABLELIST>
|
||||
</variablelist>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
</refsect2>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-09</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-CREATEFUNCTION-1">
|
||||
<refsect1info>
|
||||
<date>1998-09-09</date>
|
||||
</refsect1info>
|
||||
<title>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
<command>CREATE FUNCTION</command> allows a
|
||||
<productname>Postgres</productname> user
|
||||
to register a function
|
||||
with a database. Subsequently, this user is treated as the
|
||||
owner of the function.
|
||||
</PARA>
|
||||
</para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-09</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEFUNCTION-3">
|
||||
<refsect2info>
|
||||
<date>1998-09-09</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
Refer to the chapter on functions
|
||||
in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
||||
for further information.
|
||||
</PARA>
|
||||
<PARA>
|
||||
</para>
|
||||
<para>
|
||||
Use <command>DROP FUNCTION</command>
|
||||
to drop user-defined functions.
|
||||
</PARA>
|
||||
</para>
|
||||
|
||||
<PARA>
|
||||
<para>
|
||||
<productname>Postgres</productname> allows function "overloading";
|
||||
that is, the same name can be used for several different functions
|
||||
so long as they have distinct argument types. This facility must be
|
||||
used with caution for INTERNAL and C-language functions, however.
|
||||
</PARA>
|
||||
</para>
|
||||
|
||||
<PARA>
|
||||
<para>
|
||||
Two INTERNAL functions cannot have the same C name without causing
|
||||
errors at link time. To get around that, give them different C names
|
||||
(for example, use the argument types as part of the C names), then
|
||||
specify those names in the AS clause of <command>CREATE FUNCTION</command>.
|
||||
If the AS clause is left empty then <command>CREATE FUNCTION</command>
|
||||
assumes the C name of the function is the same as the SQL name.
|
||||
</PARA>
|
||||
</para>
|
||||
|
||||
<PARA>
|
||||
<para>
|
||||
For dynamically-loaded C functions, the SQL name of the function must
|
||||
be the same as the C function name, because the AS clause is used to
|
||||
give the path name of the object file containing the C code. In this
|
||||
|
@ -178,18 +178,18 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
|||
ways if there is a conflict of C function names. So, even if it works
|
||||
for you today, you might regret overloading names later when you try
|
||||
to run the code somewhere else.
|
||||
</PARA>
|
||||
</REFSECT2>
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-2">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-CREATEFUNCTION-2">
|
||||
<title>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
To create a simple SQL function:
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
</para>
|
||||
<programlisting>
|
||||
CREATE FUNCTION one() RETURNS int4
|
||||
AS 'SELECT 1 AS RESULT'
|
||||
LANGUAGE 'sql';
|
||||
|
@ -201,7 +201,7 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
|||
------
|
||||
1
|
||||
</computeroutput>
|
||||
</ProgramListing>
|
||||
</programlisting>
|
||||
<para>
|
||||
To create a C function, calling a routine from a user-created
|
||||
shared library. This particular routine calculates a check
|
||||
|
@ -211,44 +211,44 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
|||
<programlisting>
|
||||
<userinput>
|
||||
CREATE FUNCTION ean_checkdigit(bpchar, bpchar) RETURNS bool
|
||||
AS '/usr1/proj/bray/sql/funcs.so' LANGUAGE 'c';
|
||||
AS '/usr1/proj/bray/sql/funcs.so' LANGUAGE 'c';
|
||||
|
||||
CREATE TABLE product
|
||||
(
|
||||
id char(8) PRIMARY KEY,
|
||||
eanprefix char(8) CHECK (eanprefix ~ '[0-9]{2}-[0-9]{5}')
|
||||
REFERENCES brandname(ean_prefix),
|
||||
eancode char(6) CHECK (eancode ~ '[0-9]{6}'),
|
||||
CONSTRAINT ean CHECK (ean_checkdigit(eanprefix, eancode))
|
||||
);</userinput>
|
||||
CREATE TABLE product (
|
||||
id char(8) PRIMARY KEY,
|
||||
eanprefix char(8) CHECK (eanprefix ~ '[0-9]{2}-[0-9]{5}')
|
||||
REFERENCES brandname(ean_prefix),
|
||||
eancode char(6) CHECK (eancode ~ '[0-9]{6}'),
|
||||
CONSTRAINT ean CHECK (ean_checkdigit(eanprefix, eancode))
|
||||
);
|
||||
</userinput>
|
||||
</programlisting>
|
||||
</REFSECT1>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-3">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-CREATEFUNCTION-3">
|
||||
<title>
|
||||
Bugs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
A C function cannot return a set of values.
|
||||
</PARA>
|
||||
</REFSECT1>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-4">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-CREATEFUNCTION-4">
|
||||
<title>
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
<command>CREATE FUNCTION</command> is
|
||||
a <productname>Postgres</productname> language extension.
|
||||
</PARA>
|
||||
</para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-09</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEFUNCTION-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-09</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
SQL/PSM
|
||||
</TITLE>
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<note>
|
||||
|
@ -264,7 +264,8 @@ has not yet happened, but it is hoped that PSM will
|
|||
SQL/PSM <command>CREATE FUNCTION</command> has the following syntax:
|
||||
<synopsis>
|
||||
CREATE FUNCTION <replaceable class="parameter">name</replaceable>
|
||||
( [ [ IN | OUT | INOUT ] <replaceable class="parameter">parm</replaceable> <replaceable class="parameter">type</replaceable> [, ...] ] )
|
||||
( [ [ IN | OUT | INOUT ] <replaceable class="parameter">eter</replaceable>eable> <replaceable
|
||||
class="parameter">type</replaceable> [, ...] ] )
|
||||
RETURNS <replaceable class="parameter">rtype</replaceable>
|
||||
LANGUAGE '<replaceable class="parameter">langname</replaceable>'
|
||||
ESPECIFIC <replaceable class="parameter">routine</replaceable>
|
||||
|
@ -274,12 +275,12 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable>
|
|||
</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
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,117 @@
|
|||
<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:
|
||||
-->
|
|
@ -1,187 +1,200 @@
|
|||
<REFENTRY ID="SQL-CREATEUSER">
|
||||
<REFMETA>
|
||||
<REFENTRYTITLE>
|
||||
<refentry id="SQL-CREATEUSER">
|
||||
<refmeta>
|
||||
<refentrytitle>
|
||||
CREATE USER
|
||||
</REFENTRYTITLE>
|
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
||||
</REFMETA>
|
||||
<REFNAMEDIV>
|
||||
<REFNAME>
|
||||
</refentrytitle>
|
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>
|
||||
CREATE USER
|
||||
</REFNAME>
|
||||
<REFPURPOSE>
|
||||
</refname>
|
||||
<refpurpose>
|
||||
Creates account information for a new user
|
||||
</REFPURPOSE>
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-21</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
CREATE USER<REPLACEABLE CLASS="PARAMETER"> username</REPLACEABLE>
|
||||
[ WITH PASSWORD <REPLACEABLE CLASS="PARAMETER">password</REPLACEABLE> ]
|
||||
<refsynopsisdiv>
|
||||
<refsynopsisdivinfo>
|
||||
<date>1998-09-21</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
CREATE USER<replaceable class="PARAMETER"> username</replaceable>
|
||||
[ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
|
||||
[ CREATEDB | NOCREATEDB ]
|
||||
[ CREATEUSER | NOCREATEUSER ]
|
||||
[ IN GROUP <REPLACEABLE CLASS="PARAMETER">groupname</REPLACEABLE> [, ...] ]
|
||||
[ VALID UNTIL '<REPLACEABLE CLASS="PARAMETER">abstime</REPLACEABLE>' ]
|
||||
</SYNOPSIS>
|
||||
[ IN GROUP <replaceable class="PARAMETER">groupname</replaceable> [, ...] ]
|
||||
[ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
|
||||
</synopsis>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEUSER-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-21</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEUSER-1">
|
||||
<refsect2info>
|
||||
<date>1998-09-21</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue><replaceable class="parameter">username</replaceable></ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
The name of the user.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue><replaceable class="parameter">password</replaceable></ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
The WITH PASSWORD clause sets the user's password within
|
||||
the "<filename>pg_shadow</filename>" table. For this reason,
|
||||
<filename>"pg_shadow</filename>" is no
|
||||
longer accessible to the instance of <productname>Postgres</productname> that the
|
||||
<productname>Postgres</productname> user's password is initially set to NULL.
|
||||
<comment>The text here has got garbled.</comment>
|
||||
When a
|
||||
user's password in the "<filename>pg_shadow</filename>"
|
||||
table is NULL, user
|
||||
authentication proceeds as it historically has (HBA,
|
||||
PG_PASSWORD, etc). However, if a password is set for a
|
||||
user, a new authentication system supplants any other
|
||||
configured for the <productname>Postgres</productname> instance, and the password
|
||||
stored in the "<filename>pg_shadow</filename>" table is used
|
||||
for authentication.
|
||||
For more details on how this authentication system
|
||||
functions see pg_crypt(3). If the WITH PASSWORD clause is
|
||||
omitted, the user's password is set to the empty
|
||||
string with equates to a NULL value in the authentication
|
||||
system mentioned above.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue> CREATEDB/NOCREATEDB</ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
These clauses define a user's ability to create databases.
|
||||
If CREATEDB is specified, the user being defined will
|
||||
be allowed to create his own databases. Using NOCREATEDB
|
||||
will deny a user the ability to create databases. If this
|
||||
clause is omitted, NOCREATEDB is used by default.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue>CREATEUSER/NOCREATEUSER</ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
These clauses determine whether a user will be permitted to
|
||||
create new
|
||||
users in an instance of <productname>Postgres</productname>.
|
||||
Omitting this clause will set the user's value of this
|
||||
attribute to be NOCREATEUSER.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue><replaceable class="parameter">groupname</replaceable></ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
A name of a group into which to insert the user as a new member.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue><replaceable class="parameter">abstime</replaceable></ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
The VALID UNTIL clause sets an absolute time after which the
|
||||
user's <productname>Postgres</productname> login is no longer valid. Please note that
|
||||
if a user does not have a password defined in the
|
||||
"<filename>pg_shadow</filename>"
|
||||
table, the valid until date will not be checked
|
||||
during user authentication. If this clause is omitted,
|
||||
a NULL value is stored in "<filename>pg_shadow</filename>"
|
||||
for this attribute,
|
||||
and the login will be valid for all time.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
</title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue><replaceable class="parameter">username</replaceable></returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the user.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue><replaceable class="parameter">password</replaceable></returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The WITH PASSWORD clause sets the user's password within
|
||||
the "<filename>pg_shadow</filename>" table. For this reason,
|
||||
<filename>"pg_shadow</filename>" is no
|
||||
longer accessible to the instance of
|
||||
<productname>Postgres</productname> that the
|
||||
<productname>Postgres</productname>
|
||||
user's password is initially set to NULL.
|
||||
</para>
|
||||
<para>
|
||||
When a
|
||||
user's password in the "<filename>pg_shadow</filename>"
|
||||
table is NULL, user
|
||||
authentication proceeds as it historically has (HBA,
|
||||
PG_PASSWORD, etc). However, if a password is set for a
|
||||
user, a new authentication system supplants any other
|
||||
configured for the <productname>Postgres</productname>
|
||||
instance, and the password
|
||||
stored in the "<filename>pg_shadow</filename>" table is used
|
||||
for authentication.
|
||||
For more details on how this authentication system
|
||||
functions see pg_crypt(3). If the WITH PASSWORD clause is
|
||||
omitted, the user's password is set to the empty
|
||||
string which equates to a NULL value in the authentication
|
||||
system mentioned above.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue> CREATEDB/NOCREATEDB</returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
These clauses define a user's ability to create databases.
|
||||
If CREATEDB is specified, the user being defined will
|
||||
be allowed to create his own databases. Using NOCREATEDB
|
||||
will deny a user the ability to create databases. If this
|
||||
clause is omitted, NOCREATEDB is used by default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue>CREATEUSER/NOCREATEUSER</returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
These clauses determine whether a user will be permitted to
|
||||
create new
|
||||
users in an instance of <productname>Postgres</productname>.
|
||||
Omitting this clause will set the user's value of this
|
||||
attribute to be NOCREATEUSER.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue><replaceable class="parameter">groupname</replaceable></returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A name of a group into which to insert the user as a new member.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue><replaceable class="parameter">abstime</replaceable></returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The VALID UNTIL clause sets an absolute time after which the
|
||||
user's <productname>Postgres</productname>
|
||||
login is no longer valid. Please note that
|
||||
if a user does not have a password defined in the
|
||||
"<filename>pg_shadow</filename>"
|
||||
table, the valid until date will not be checked
|
||||
during user authentication. If this clause is omitted,
|
||||
a NULL value is stored in "<filename>pg_shadow</filename>"
|
||||
for this attribute,
|
||||
and the login will be valid for all time.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</refsect2>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEUSER-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-21</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEUSER-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-21</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue>CREATE USER</ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if the command completes successfully.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<ReturnValue>ERROR: removeUser: user "<replaceable class="parameter">username</replaceable>" does not exist</ReturnValue>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
if "<replaceable class="parameter">username</replaceable>" not found.
|
||||
</PARA>
|
||||
<comment>I don't understand this and I don't know how to get
|
||||
this error message.</comment>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</VARIABLELIST>
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
</title>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue>CREATE USER</returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Message returned if the command completes successfully.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue>ERROR: removeUser: user "<replaceable
|
||||
class="parameter">username</replaceable>" does not exist</returnvalue>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
if "<replaceable class="parameter">username</replaceable>" not found.
|
||||
</para>
|
||||
<comment>I don't understand this and I don't know how to get
|
||||
this error message.</comment>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-CREATEUSER-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-21</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-CREATEUSER-1">
|
||||
<refsect1info>
|
||||
<date>1998-09-21</date>
|
||||
</refsect1info>
|
||||
<title>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
CREATE USER will add a new user to an instance of
|
||||
<productname>Postgres</productname>.
|
||||
</PARA>
|
||||
<PARA>
|
||||
</para>
|
||||
<para>
|
||||
The new user will be given a <filename>usesysid</filename> of:
|
||||
'<command>SELECT MAX(usesysid) + 1 FROM pg_shadow</command>'.
|
||||
This means that
|
||||
|
@ -196,18 +209,18 @@ CREATE USER<REPLACEABLE CLASS="PARAMETER"> username</REPLACEABLE>
|
|||
for any given user,
|
||||
use the "createuser" script provided with the <productname>Postgres</productname>
|
||||
distribution.
|
||||
</PARA>
|
||||
</para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEUSER-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-21</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEUSER-3">
|
||||
<refsect2info>
|
||||
<date>1998-09-21</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
CREATE USER statement is a <productname>Postgres</productname> language extension.
|
||||
</PARA>
|
||||
</para>
|
||||
<para>
|
||||
Use DROP USER or ALTER USER statements to remove or modify a user
|
||||
account.</para>
|
||||
|
@ -229,68 +242,67 @@ CREATE USER<REPLACEABLE CLASS="PARAMETER"> username</REPLACEABLE>
|
|||
| valuntil | abstime | 4 |
|
||||
+--------------------------+--------------------------+-------+
|
||||
</programlisting>
|
||||
</REFSECT2>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-CREATEUSER-2">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-CREATEUSER-2">
|
||||
<title>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
Create a user with no password:
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
</para>
|
||||
<programlisting>
|
||||
CREATE USER jonathan
|
||||
</ProgramListing>
|
||||
<PARA>
|
||||
</programlisting>
|
||||
<para>
|
||||
Create a user with a password:
|
||||
</PARA>
|
||||
<ProgramListing>
|
||||
</para>
|
||||
<programlisting>
|
||||
CREATE USER davide WITH PASSWORD jw8s0F4
|
||||
</ProgramListing>
|
||||
</programlisting>
|
||||
<para>
|
||||
Create a user with a password, whose account is valid until the end of 2001.
|
||||
Note that after one second has ticked in 2002, the account is not
|
||||
valid:
|
||||
</para>
|
||||
<ProgramListing>
|
||||
<programlisting>
|
||||
CREATE USER miriam WITH PASSWORD jw8s0F4 VALID UNTIL 'Jan 1 2002'
|
||||
</ProgramListing>
|
||||
</programlisting>
|
||||
<para>
|
||||
Create an account where the user can create databases:
|
||||
</para>
|
||||
<ProgramListing>
|
||||
<programlisting>
|
||||
CREATE USER manuel WITH PASSWORD jw8s0F4 CREATEDB
|
||||
</ProgramListing>
|
||||
</programlisting>
|
||||
|
||||
</REFSECT1>
|
||||
</refsect1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-CREATEUSER-3">
|
||||
<TITLE>
|
||||
<refsect1 id="R1-SQL-CREATEUSER-3">
|
||||
<title>
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
</title>
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-CREATEUSER-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-21</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
<refsect2 id="R2-SQL-CREATEUSER-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-21</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</title>
|
||||
<para>
|
||||
There is no CREATE USER statement in SQL92.
|
||||
</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
|
||||
|
|
|
@ -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>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,142 +1,158 @@
|
|||
<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:
|
||||
-->
|
||||
|
|
|
@ -1,384 +1,409 @@
|
|||
<REFENTRY ID="SQL-REVOKE">
|
||||
<REFMETA>
|
||||
<REFENTRYTITLE>
|
||||
REVOKE
|
||||
</REFENTRYTITLE>
|
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
||||
</REFMETA>
|
||||
<REFNAMEDIV>
|
||||
<REFNAME>
|
||||
REVOKE
|
||||
</REFNAME>
|
||||
<REFPURPOSE>
|
||||
Revokes access privilege from a user, a group or all users.
|
||||
</REFPURPOSE>
|
||||
</refnamediv>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
<REPLACEABLE CLASS="PARAMETER">
|
||||
</REPLACEABLE>
|
||||
REVOKE <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
||||
ON <REPLACEABLE CLASS="PARAMETER">object</REPLACEABLE> [, ...]
|
||||
FROM { PUBLIC | GROUP <REPLACEABLE CLASS="PARAMETER">group</REPLACEABLE> | <REPLACEABLE CLASS="PARAMETER">username</REPLACEABLE> }
|
||||
</SYNOPSIS>
|
||||
<refentry id="SQL-REVOKE">
|
||||
<refmeta>
|
||||
<refentrytitle>
|
||||
REVOKE
|
||||
</refentrytitle>
|
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>
|
||||
REVOKE
|
||||
</refname>
|
||||
<refpurpose>
|
||||
Revokes access privilege from a user, a group or all users.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<refsynopsisdivinfo>
|
||||
<date>1998-09-24</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
REVOKE <replaceable class="PARAMETER">privilege</replaceable> [, ...]
|
||||
ON <replaceable class="PARAMETER">object</replaceable> [, ...]
|
||||
FROM { PUBLIC | GROUP <replaceable class="PARAMETER">ER">g</replaceable>BLE> | <replaceable class="PARAMETER">username</replaceable> }
|
||||
</synopsis>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-1">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Inputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
The possible privileges are:
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<refsect2 id="R2-SQL-REVOKE-1">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Inputs
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
SELECT
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Privilege to access all of the columns of a specific
|
||||
table/view.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
INSERT
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Privilege to insert data into all columns of a
|
||||
specific table.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
UPDATE
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Privilege to update all columns of a specific
|
||||
table.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
DELETE
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Privilege to delete rows from a specific table.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
RULE
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Privilege to define rules on table/view.
|
||||
(See <command>CREATE RULE</command>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
ALL
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Rescind all privileges.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<REPLACEABLE CLASS="PARAMETER">object</REPLACEABLE>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
The name of an object from which to revoke access.
|
||||
The possible objects are:
|
||||
<itemizedlist mark="bullet" spacing="compact">
|
||||
<listitem>
|
||||
<para>
|
||||
table
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
view
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
sequence
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
index
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<REPLACEABLE CLASS="PARAMETER">group</REPLACEABLE>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
The name of a group from whom to revoke privileges.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<REPLACEABLE CLASS="PARAMETER">username</REPLACEABLE>
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
The name of a user from whom revoke privileges. Use the PUBLIC keyword
|
||||
to specify all users.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
PUBLIC
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Rescind the specified privilege(s) for all users.
|
||||
</para>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
</VARIABLELIST>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">privilege</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The possible privileges are:
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<PARA>
|
||||
|
||||
<VARIABLELIST>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
CHANGE
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if successfully.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
ERROR
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
Message returned if object is not available or impossible
|
||||
to revoke privileges from a group or users.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</VARIABLELIST>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-REVOKE-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
REVOKE allows creator of an object to revoke permissions granted
|
||||
before, from all users (via PUBLIC) or a certain user or group.
|
||||
</para>
|
||||
<varlistentry>
|
||||
<term>
|
||||
SELECT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Privilege to access all of the columns of a specific
|
||||
table/view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
Refer to psql \z command for further information about permissions
|
||||
on existing objects:
|
||||
|
||||
<programlisting>
|
||||
Database = lusitania
|
||||
+------------------+---------------------------------------------+
|
||||
| Relation | Grant/Revoke Permissions |
|
||||
+------------------+---------------------------------------------+
|
||||
| mytable | {"=rw","miriam=arwR","group todos=rw"} |
|
||||
+------------------+---------------------------------------------+
|
||||
Legend:
|
||||
uname=arwR -- privileges granted to a user
|
||||
group gname=arwR -- privileges granted to a GROUP
|
||||
=arwR -- privileges granted to PUBLIC
|
||||
|
||||
r -- SELECT
|
||||
w -- UPDATE/DELETE
|
||||
a -- INSERT
|
||||
R -- RULE
|
||||
arwR -- ALL
|
||||
</programlisting>
|
||||
</para>
|
||||
<tip>
|
||||
<para>
|
||||
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;
|
||||
</programlisting>
|
||||
</para>
|
||||
</tip>
|
||||
<varlistentry>
|
||||
<term>
|
||||
INSERT
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Privilege to insert data into all columns of a
|
||||
specific table.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</REFSECT2>
|
||||
</refsect1>
|
||||
<varlistentry>
|
||||
<term>
|
||||
UPDATE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Privilege to update all columns of a specific
|
||||
table.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-REVOKE-2">
|
||||
<TITLE>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
-- 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;
|
||||
</ProgramListing>
|
||||
</para>
|
||||
</REFSECT1>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-REVOKE-3">
|
||||
<TITLE>
|
||||
Compatibility
|
||||
</TITLE>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-01</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
The SQL92 syntax for <command>REVOKE</command>
|
||||
has additional capabilities for rescinding
|
||||
privileges, including those on individual columns in tables:
|
||||
<varlistentry>
|
||||
<term>
|
||||
DELETE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Privilege to delete rows from a specific table.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<synopsis>
|
||||
REVOKE { SELECT | DELETE | USAGE | ALL PRIVILEGES } [, ...]
|
||||
ON <replaceable class="parameter">object</replaceable>
|
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
||||
REVOKE { INSERT | UPDATE | REFERENCES } [, ...] [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
|
||||
ON <replaceable class="parameter">object</replaceable>
|
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
||||
</synopsis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Refer to the <command>GRANT</command> command for details on individual fields.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<synopsis>
|
||||
REVOKE GRANT OPTION FOR <replaceable class="parameter">privilege</replaceable> [, ...]
|
||||
ON <replaceable class="parameter">object</replaceable>
|
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
||||
</synopsis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Rescinds authority for a user to grant the specified privilege to others.
|
||||
Refer to the <command>GRANT</command> command for details on individual fields.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<varlistentry>
|
||||
<term>
|
||||
RULE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Privilege to define rules on table/view.
|
||||
(See <command>CREATE RULE</command>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
ALL
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Rescind all privileges.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">object</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of an object from which to revoke access.
|
||||
The possible objects are:
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
<listitem>
|
||||
<para>
|
||||
The possible objects are:
|
||||
<simplelist>
|
||||
<member> [ TABLE ] table/view
|
||||
</member>
|
||||
<member> CHARACTER SET character-set
|
||||
</member>
|
||||
<member> COLLATION collation
|
||||
</member>
|
||||
<member> TRANSLATION translation
|
||||
</member>
|
||||
<member> DOMAIN domain
|
||||
</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<para>
|
||||
If user1 gives a privilege WITH GRANT OPTION to user2,
|
||||
and user2 gives it to user3 then user1 can revoke
|
||||
this privilege in cascade using the CASCADE keyword.
|
||||
table
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
If user1 gives a privilege WITH GRANT OPTION to user2,
|
||||
and user2 gives it to user3 then if user1 try revoke
|
||||
this privilege it fails if he/she specify the RESTRICT
|
||||
keyword.
|
||||
view
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</REFENTRY>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
sequence
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
index
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">group</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a group from whom to revoke privileges.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">username</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a user from whom revoke privileges. Use the PUBLIC keyword
|
||||
to specify all users.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
PUBLIC
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Rescind the specified privilege(s) for all users.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="R2-SQL-REVOKE-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
CHANGE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Message returned if successfully.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
ERROR
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Message returned if object is not available or impossible
|
||||
to revoke privileges from a group or users.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1 id="R1-SQL-REVOKE-1">
|
||||
<refsect1info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect1info>
|
||||
<title>
|
||||
Description
|
||||
</title>
|
||||
<para>
|
||||
REVOKE allows creator of an object to revoke permissions granted
|
||||
before, from all users (via PUBLIC) or a certain user or group.
|
||||
</para>
|
||||
|
||||
<refsect2 id="R2-SQL-REVOKE-3">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Notes
|
||||
</title>
|
||||
<para>
|
||||
Refer to psql \z command for further information about permissions
|
||||
on existing objects:
|
||||
|
||||
<programlisting>
|
||||
Database = lusitania
|
||||
+------------------+---------------------------------------------+
|
||||
| Relation | Grant/Revoke Permissions |
|
||||
+------------------+---------------------------------------------+
|
||||
| mytable | {"=rw","miriam=arwR","group todos=rw"} |
|
||||
+------------------+---------------------------------------------+
|
||||
Legend:
|
||||
uname=arwR -- privileges granted to a user
|
||||
group gname=arwR -- privileges granted to a GROUP
|
||||
=arwR -- privileges granted to PUBLIC
|
||||
|
||||
r -- SELECT
|
||||
w -- UPDATE/DELETE
|
||||
a -- INSERT
|
||||
R -- RULE
|
||||
arwR -- ALL
|
||||
</programlisting>
|
||||
</para>
|
||||
<tip>
|
||||
<para>
|
||||
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;
|
||||
</programlisting>
|
||||
</para>
|
||||
</tip>
|
||||
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="R1-SQL-REVOKE-2">
|
||||
<title>
|
||||
Usage
|
||||
</title>
|
||||
<para>
|
||||
<programlisting>
|
||||
-- revoke insert privilege from all users on table films:
|
||||
--
|
||||
REVOKE INSERT ON films FROM PUBLIC;
|
||||
</programlisting>
|
||||
|
||||
<programlisting>
|
||||
-- revoke all privileges from user manuel on view kinds:
|
||||
--
|
||||
REVOKE ALL ON kinds FROM manuel;
|
||||
</programlisting>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="R1-SQL-REVOKE-3">
|
||||
<title>
|
||||
Compatibility
|
||||
</title>
|
||||
|
||||
<refsect2 id="R2-SQL-REVOKE-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-01</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
SQL92
|
||||
</title>
|
||||
<para>
|
||||
The SQL92 syntax for <command>REVOKE</command>
|
||||
has additional capabilities for rescinding
|
||||
privileges, including those on individual columns in tables:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<synopsis>
|
||||
REVOKE { SELECT | DELETE | USAGE | ALL PRIVILEGES } [, ...]
|
||||
ON <replaceable class="parameter">object</replaceable>
|
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
||||
REVOKE { INSERT | UPDATE | REFERENCES } [, ...] [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
|
||||
ON <replaceable class="parameter">object</replaceable>
|
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
||||
</synopsis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Refer to <command>GRANT</command> for details on individual fields.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<synopsis>
|
||||
REVOKE GRANT OPTION FOR <replaceable class="parameter">privilege</replaceable> [, ...]
|
||||
ON <replaceable class="parameter">object</replaceable>
|
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
||||
</synopsis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Rescinds authority for a user to grant the specified privilege
|
||||
to others.
|
||||
Refer to the <command>GRANT</command> command for details
|
||||
on individual fields.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
The possible objects are:
|
||||
<simplelist>
|
||||
<member>
|
||||
[ TABLE ] table/view
|
||||
</member>
|
||||
<member>
|
||||
CHARACTER SET character-set
|
||||
</member>
|
||||
<member>
|
||||
COLLATION collation
|
||||
</member>
|
||||
<member>
|
||||
TRANSLATION translation
|
||||
</member>
|
||||
<member>
|
||||
DOMAIN domain
|
||||
</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If user1 gives a privilege WITH GRANT OPTION to user2,
|
||||
and user2 gives it to user3 then user1 can revoke
|
||||
this privilege in cascade using the CASCADE keyword.
|
||||
</para>
|
||||
<para>
|
||||
If user1 gives a privilege WITH GRANT OPTION to user2,
|
||||
and user2 gives it to user3 then if user1 try revoke
|
||||
this privilege it fails if he/she specify the RESTRICT
|
||||
keyword.
|
||||
</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:
|
||||
-->
|
||||
|
|
|
@ -1,133 +1,154 @@
|
|||
<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>
|
||||
|
||||
<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-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-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
Full compatibility.
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</REFENTRY>
|
||||
<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 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:
|
||||
-->
|
||||
|
|
|
@ -18,13 +18,16 @@ SELECT
|
|||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
|
||||
<replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">name</replaceable> ] [, ...]
|
||||
<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> ] [, ...] ]
|
||||
[ 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> ]
|
||||
[ { 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]]
|
||||
|
@ -66,17 +69,17 @@ SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<varlistentry>
|
||||
<term>
|
||||
TEMP
|
||||
</TERM>
|
||||
<LISTITEM>
|
||||
<PARA>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The table is created unique to this session, and is
|
||||
automatically dropped on session exit.
|
||||
</PARA>
|
||||
</LISTITEM>
|
||||
</VARLISTENTRY>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
|
@ -215,7 +218,8 @@ SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
|
|||
<command>DISTINCT</command> will eliminate all duplicate rows from the
|
||||
selection.
|
||||
<command>DISTINCT ON <replaceable class="PARAMETER">column</replaceable></command> will eliminate all duplicates in the specified column; this is
|
||||
equivalent to using <command>GROUP BY <replaceable class="PARAMETER">column</replaceable></command>. <command>ALL</command> will return all candidate rows,
|
||||
equivalent to using <command>GROUP BY <replaceable
|
||||
class="PARAMETER">column</replaceable></command>. <command>ALL</command> will return all candidate rows,
|
||||
including duplicates.</para>
|
||||
|
||||
<para>
|
||||
|
@ -269,7 +273,9 @@ including duplicates.</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">ETER">c</replaceable>e<replaceable class="PARAMETER">"PAR</replaceable>replaceable> [ <replaceable
|
||||
class="PARAMETER">log_op</replaceable> ... ]
|
||||
</synopsis>
|
||||
|
||||
where <replaceable class="PARAMETER">cond_op</replaceable> can be
|
||||
|
@ -381,7 +387,8 @@ SELECT name FROM distributors ORDER BY code;
|
|||
</title>
|
||||
<para>
|
||||
<synopsis>
|
||||
<replaceable class="PARAMETER">table_query</replaceable> UNION [ ALL ] <replaceable class="PARAMETER">table_query</replaceable>
|
||||
<replaceable class="PARAMETER">table_query</replaceable> UNION [ ALL ]
|
||||
<replaceable class="PARAMETER">table_query</replaceable>
|
||||
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||
</synopsis>
|
||||
|
||||
|
@ -417,7 +424,8 @@ SELECT name FROM distributors ORDER BY code;
|
|||
</title>
|
||||
<para>
|
||||
<synopsis>
|
||||
<replaceable class="PARAMETER">table_query</replaceable> INTERSECT <replaceable class="PARAMETER">table_query</replaceable>
|
||||
<replaceable class="PARAMETER">table_query</replaceable> INTERSECT
|
||||
<replaceable class="PARAMETER">table_query</replaceable>
|
||||
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||
</synopsis>
|
||||
|
||||
|
@ -448,7 +456,8 @@ SELECT name FROM distributors ORDER BY code;
|
|||
</title>
|
||||
<para>
|
||||
<synopsis>
|
||||
<replaceable class="PARAMETER">table_query</replaceable> EXCEPT <replaceable class="PARAMETER">table_query</replaceable>
|
||||
<replaceable class="PARAMETER">table_query</replaceable> EXCEPT
|
||||
<replaceable class="PARAMETER">table_query</replaceable>
|
||||
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||
</synopsis>
|
||||
|
||||
|
@ -485,25 +494,25 @@ 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
|
||||
-------------------------+---+----------------+----------+----------
|
||||
The Third Man |101|British Lion |1949-12-23|Drama
|
||||
The African Queen |101|British Lion |1951-08-11|Romantic
|
||||
Une Femme est une Femme |102|Jean Luc Godard |1961-03-12|Romantic
|
||||
Vertigo |103|Paramount |1958-11-14|Action
|
||||
Becket |103|Paramount |1964-02-03|Drama
|
||||
48 Hrs |103|Paramount |1982-10-22|Action
|
||||
War and Peace |104|Mosfilm |1967-02-12|Drama
|
||||
West Side Story |105|United Artists |1961-01-03|Musical
|
||||
Bananas |105|United Artists |1971-07-13|Comedy
|
||||
Yojimbo |106|Toho |1961-06-16|Drama
|
||||
There's a Girl in my Soup|107|Columbia |1970-06-11|Comedy
|
||||
Taxi Driver |107|Columbia |1975-05-15|Action
|
||||
Absence of Malice |107|Columbia |1981-11-15|Action
|
||||
Storia di una donna |108|Westward |1970-08-15|Romantic
|
||||
The King and I |109|20th Century Fox|1956-08-11|Musical
|
||||
Das Boot |110|Bavaria Atelier |1981-11-11|Drama
|
||||
Bed Knobs and Broomsticks|111|Walt Disney | |Musical
|
||||
title |did|name | date_prod|kind
|
||||
-------------------------+---+----------------+----------+----------
|
||||
The Third Man |101|British Lion |1949-12-23|Drama
|
||||
The African Queen |101|British Lion |1951-08-11|Romantic
|
||||
Une Femme est une Femme |102|Jean Luc Godard |1961-03-12|Romantic
|
||||
Vertigo |103|Paramount |1958-11-14|Action
|
||||
Becket |103|Paramount |1964-02-03|Drama
|
||||
48 Hrs |103|Paramount |1982-10-22|Action
|
||||
War and Peace |104|Mosfilm |1967-02-12|Drama
|
||||
West Side Story |105|United Artists |1961-01-03|Musical
|
||||
Bananas |105|United Artists |1971-07-13|Comedy
|
||||
Yojimbo |106|Toho |1961-06-16|Drama
|
||||
There's a Girl in my Soup|107|Columbia |1970-06-11|Comedy
|
||||
Taxi Driver |107|Columbia |1975-05-15|Action
|
||||
Absence of Malice |107|Columbia |1981-11-15|Action
|
||||
Storia di una donna |108|Westward |1970-08-15|Romantic
|
||||
The King and I |109|20th Century Fox|1956-08-11|Musical
|
||||
Das Boot |110|Bavaria Atelier |1981-11-11|Drama
|
||||
Bed Knobs and Broomsticks|111|Walt Disney | |Musical
|
||||
</programlisting>
|
||||
<para>
|
||||
To sum the column <literal>len</literal> of all films and group
|
||||
|
@ -587,14 +596,14 @@ SELECT actors.name
|
|||
FROM actors
|
||||
WHERE actors.name LIKE 'W%'
|
||||
|
||||
name
|
||||
--------------
|
||||
Walt Disney
|
||||
Walter Matthau
|
||||
Warner Bros.
|
||||
Warren Beatty
|
||||
Westward
|
||||
Woody Allen
|
||||
name
|
||||
--------------
|
||||
Walt Disney
|
||||
Walter Matthau
|
||||
Warner Bros.
|
||||
Warren Beatty
|
||||
Westward
|
||||
Woody Allen
|
||||
</programlisting>
|
||||
|
||||
</refsect1>
|
||||
|
@ -693,85 +702,10 @@ SELECT distributors.* WHERE name = 'Westwood';
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<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:t
|
||||
sgml-omittag:
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
<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>
|
||||
|
|
|
@ -1,171 +1,189 @@
|
|||
<REFENTRY ID="SQL-SHOW">
|
||||
<REFMETA>
|
||||
<REFENTRYTITLE>
|
||||
SHOW
|
||||
</REFENTRYTITLE>
|
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
||||
</REFMETA>
|
||||
<REFNAMEDIV>
|
||||
<REFNAME>
|
||||
SHOW
|
||||
</REFNAME>
|
||||
<REFPURPOSE>
|
||||
Shows run-time parameters for session
|
||||
</REFPURPOSE>
|
||||
</refnamediv>
|
||||
<REFSYNOPSISDIV>
|
||||
<REFSYNOPSISDIVINFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSYNOPSISDIVINFO>
|
||||
<SYNOPSIS>
|
||||
SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
||||
</SYNOPSIS>
|
||||
<refentry id="SQL-SHOW">
|
||||
<refmeta>
|
||||
<refentrytitle>
|
||||
SHOW
|
||||
</refentrytitle>
|
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>
|
||||
SHOW
|
||||
</refname>
|
||||
<refpurpose>
|
||||
Shows run-time parameters for session
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<refsynopsisdivinfo>
|
||||
<date>1998-09-24</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
SHOW <replaceable class="PARAMETER">variable</replaceable>
|
||||
</synopsis>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-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 <command>SET</command> for more information on available
|
||||
variables.
|
||||
</para>
|
||||
</listitem>
|
||||
</VARLISTENTRY>
|
||||
</VARIABLELIST>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
<refsect2 id="R2-SQL-SHOW-1">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Inputs
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-2">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Outputs
|
||||
</TITLE>
|
||||
<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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<VARLISTENTRY>
|
||||
<TERM>
|
||||
<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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</VARIABLELIST>
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</REFSYNOPSISDIV>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<replaceable class="PARAMETER">variable</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Refer to <command>SET</command> for more information on available
|
||||
variables.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SHOW-1">
|
||||
<REFSECT1INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT1INFO>
|
||||
<TITLE>
|
||||
Description
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<command>SHOW</command> will display the current
|
||||
configuration parameters for
|
||||
variable during a session.
|
||||
</para>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
<refsect2 id="R2-SQL-SHOW-2">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Outputs
|
||||
</title>
|
||||
<para>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-3">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
Notes
|
||||
</TITLE>
|
||||
<PARA>
|
||||
The <command>SHOW</command> is a <productname>Postgres</productname>
|
||||
language extension.
|
||||
</para>
|
||||
<para>
|
||||
Refer to <command>SET</command>/<command>RESET</command>
|
||||
to set/reset variable values.
|
||||
See also <command>SET TIME ZONE</command>.
|
||||
</para>
|
||||
</REFSECT2>
|
||||
</REFSECT1>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<returnvalue>NOTICE: <replaceable
|
||||
class="PARAMETER">">variab</replaceable>E> is <replaceable>value</replaceable></returnvalue>
|
||||
SHOW VARIABLE
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Message returned if successfully.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SHOW-2">
|
||||
<TITLE>
|
||||
Usage
|
||||
</TITLE>
|
||||
<PARA>
|
||||
<ProgramListing>
|
||||
-- show DateStyle;
|
||||
SHOW DateStyle;
|
||||
NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
|
||||
|
||||
-- show Geqo;
|
||||
SHOW GEQO;
|
||||
NOTICE:GEQO is ON
|
||||
</ProgramListing>
|
||||
</para>
|
||||
</REFSECT1>
|
||||
<refsect1 id="R1-SQL-SHOW-1">
|
||||
<refsect1info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect1info>
|
||||
<title>
|
||||
Description
|
||||
</title>
|
||||
<para>
|
||||
<command>SHOW</command> will display the current
|
||||
configuration parameters for
|
||||
variable during a session.
|
||||
</para>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<REFSECT1 ID="R1-SQL-SHOW-3">
|
||||
<TITLE>
|
||||
Compatibility
|
||||
</TITLE>
|
||||
<PARA>
|
||||
</PARA>
|
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-4">
|
||||
<REFSECT2INFO>
|
||||
<DATE>1998-09-24</DATE>
|
||||
</REFSECT2INFO>
|
||||
<TITLE>
|
||||
SQL92
|
||||
</TITLE>
|
||||
<PARA>
|
||||
There is no <command>SET</command> defined in <acronym>SQL92</acronym>.
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
</REFENTRY>
|
||||
<refsect2 id="R2-SQL-SHOW-3">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
Notes
|
||||
</title>
|
||||
<para>
|
||||
The <command>SHOW</command> is a <productname>Postgres</productname>
|
||||
language extension.
|
||||
</para>
|
||||
<para>
|
||||
Refer to <command>SET</command>/<command>RESET</command>
|
||||
to set/reset variable values.
|
||||
See also <command>SET TIME ZONE</command>.
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="R1-SQL-SHOW-2">
|
||||
<title>
|
||||
Usage
|
||||
</title>
|
||||
<para>
|
||||
<programlisting>
|
||||
-- show DateStyle;
|
||||
SHOW DateStyle;
|
||||
NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
|
||||
|
||||
-- show Geqo;
|
||||
SHOW GEQO;
|
||||
NOTICE:GEQO is ON
|
||||
</programlisting>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="R1-SQL-SHOW-3">
|
||||
<title>
|
||||
Compatibility
|
||||
</title>
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<refsect2 id="R2-SQL-SHOW-4">
|
||||
<refsect2info>
|
||||
<date>1998-09-24</date>
|
||||
</refsect2info>
|
||||
<title>
|
||||
SQL92
|
||||
</title>
|
||||
<para>
|
||||
There is no <command>SHOW</command> defined 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:
|
||||
-->
|
||||
|
|
Loading…
Reference in New Issue