mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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 createRule system "create_rule.sgml">
|
||||||
<!entity createSequence system "create_sequence.sgml">
|
<!entity createSequence system "create_sequence.sgml">
|
||||||
<!entity createTable system "create_table.sgml">
|
<!entity createTable system "create_table.sgml">
|
||||||
|
<!entity createTableAs system "create_table_as.sgml">
|
||||||
<!entity createTrigger system "create_trigger.sgml">
|
<!entity createTrigger system "create_trigger.sgml">
|
||||||
<!entity createType system "create_type.sgml">
|
<!entity createType system "create_type.sgml">
|
||||||
<!entity createUser system "create_user.sgml">
|
<!entity createUser system "create_user.sgml">
|
||||||
@ -104,6 +105,7 @@
|
|||||||
<!entity revoke system "revoke.sgml">
|
<!entity revoke system "revoke.sgml">
|
||||||
<!entity rollback system "rollback.sgml">
|
<!entity rollback system "rollback.sgml">
|
||||||
<!entity select system "select.sgml">
|
<!entity select system "select.sgml">
|
||||||
|
<!entity selectInto system "select_into.sgml">
|
||||||
<!entity set system "set.sgml">
|
<!entity set system "set.sgml">
|
||||||
<!entity show system "show.sgml">
|
<!entity show system "show.sgml">
|
||||||
<!entity unlisten system "unlisten.sgml">
|
<!entity unlisten system "unlisten.sgml">
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
<REFENTRY ID="SQL-ALTERUSER">
|
<refentry id="SQL-ALTERUSER">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle>
|
||||||
ALTER USER
|
ALTER USER
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
ALTER USER
|
ALTER USER
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Modifies user account information
|
Modifies user account information
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
ALTER USER <replaceable class="PARAMETER">username</replaceable>
|
ALTER USER <replaceable class="PARAMETER">username</replaceable>
|
||||||
[ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
|
[ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
|
||||||
@ -26,91 +26,91 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
|
|||||||
[ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
|
[ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ALTERUSER-1">
|
<refsect2 id="R2-SQL-ALTERUSER-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
Refer to <command>CREATE USER</command> for a detailed description of each
|
Refer to <command>CREATE USER</command> for a detailed description of each
|
||||||
clause.
|
clause.
|
||||||
</para>
|
</para>
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<REPLACEABLE CLASS="PARAMETER"> username </REPLACEABLE>
|
<replaceable class="PARAMETER"> username </replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The Postgres account name of the user whose details are to be altered.
|
The Postgres account name of the user whose details are to be altered.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<REPLACEABLE CLASS="PARAMETER"> password </REPLACEABLE>
|
<replaceable class="PARAMETER"> password </replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The new password to be used for this account.
|
The new password to be used for this account.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<REPLACEABLE CLASS="PARAMETER"> groupname </REPLACEABLE>
|
<replaceable class="PARAMETER"> groupname </replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The name of an access group into which this account is to be put.
|
The name of an access group into which this account is to be put.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<REPLACEABLE CLASS="PARAMETER"> abstime </REPLACEABLE>
|
<replaceable class="PARAMETER"> abstime </replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The date (and, optionally, the time)
|
The date (and, optionally, the time)
|
||||||
at which this user's access is to be terminated.
|
at which this user's access is to be terminated.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
</VARIABLELIST>
|
</variablelist>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ALTERUSER-2">
|
<refsect2 id="R2-SQL-ALTERUSER-2">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<returnvalue>ALTER USER</returnvalue>
|
<returnvalue>ALTER USER</returnvalue>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
Message returned if the alteration was successful.
|
Message returned if the alteration was successful.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<returnvalue>ERROR: alterUser: user "username" does not exist</returnvalue>
|
<returnvalue>ERROR: alterUser: user "username" does not exist</returnvalue>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
Error message returned if the user specified doesn't
|
Error message returned if the user specified doesn't
|
||||||
exist.
|
exist.
|
||||||
</para>
|
</para>
|
||||||
@ -118,17 +118,17 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</REFSYNOPSISDIV>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-ALTERUSER-1">
|
<refsect1 id="R1-SQL-ALTERUSER-1">
|
||||||
<REFSECT1INFO>
|
<refsect1info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT1INFO>
|
</refsect1info>
|
||||||
<TITLE>
|
<title>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<command>ALTER USER</command> is used to change the attributes of a user's
|
<command>ALTER USER</command> is used to change the attributes of a user's
|
||||||
<productname>Postgres</productname> account.
|
<productname>Postgres</productname> account.
|
||||||
Please note that it is not possible
|
Please note that it is not possible
|
||||||
@ -137,21 +137,21 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
|
|||||||
<productname>Postgres</productname>
|
<productname>Postgres</productname>
|
||||||
user or any user with read and modify permissions on
|
user or any user with read and modify permissions on
|
||||||
"pg_shadow" to alter user passwords.
|
"pg_shadow" to alter user passwords.
|
||||||
</PARA>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If any of the clauses of the alter user statement are
|
If any of the clauses of the alter user statement are
|
||||||
omitted, the corresponding value in the "pg_shadow" table
|
omitted, the corresponding value in the "pg_shadow" table
|
||||||
is left unchanged.
|
is left unchanged.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ALTERUSER-3">
|
<refsect2 id="R2-SQL-ALTERUSER-3">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<command>ALTER USER</command> statement
|
<command>ALTER USER</command> statement
|
||||||
is a <productname>Postgres</productname>
|
is a <productname>Postgres</productname>
|
||||||
language extension.
|
language extension.
|
||||||
@ -162,37 +162,37 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
|
|||||||
account.
|
account.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In the current release (v6.4), the IN GROUP clause is parsed
|
In the current release (v6.5), the IN GROUP clause is parsed
|
||||||
but has no affect. When it is fully implemented, it is
|
but has no affect. When it is fully implemented, it is
|
||||||
intended to modify the pg_group relation.
|
intended to modify the pg_group relation.
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-ALTERUSER-2">
|
<refsect1 id="R1-SQL-ALTERUSER-2">
|
||||||
<TITLE>
|
<title>
|
||||||
Usage
|
Usage
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
Change a user password
|
Change a user password
|
||||||
</PARA>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
ALTER USER davide WITH PASSWORD hu8jmn3;
|
ALTER USER davide WITH PASSWORD hu8jmn3;
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Change a user's valid until date
|
Change a user's valid until date
|
||||||
</para>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
|
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Change a user's valid until date, specifying that his
|
Change a user's valid until date, specifying that his
|
||||||
authorisation should expire at midday on 4th May 1998 using
|
authorisation should expire at midday on 4th May 1998 using
|
||||||
the time zone which is one hour ahead of UTC
|
the time zone which is one hour ahead of UTC
|
||||||
</para>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
|
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Give a user the ability to create other users and new databases.
|
Give a user the ability to create other users and new databases.
|
||||||
</para>
|
</para>
|
||||||
@ -205,36 +205,36 @@ ALTER USER miriam CREATEUSER CREATEDB;
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
ALTER USER miriam IN GROUP sales, payroll;
|
ALTER USER miriam IN GROUP sales, payroll;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</REFSECT1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-ALTERUSER-3">
|
<refsect1 id="R1-SQL-ALTERUSER-3">
|
||||||
<TITLE>
|
<title>
|
||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ALTERUSER-4">
|
<refsect2 id="R2-SQL-ALTERUSER-4">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
There is no <command>ALTER USER</command> statement in
|
There is no <command>ALTER USER</command> statement in
|
||||||
<acronym>SQL92</acronym>.
|
<acronym>SQL92</acronym>.
|
||||||
The standard leaves
|
The standard leaves
|
||||||
the definition of users to the implementation.
|
the definition of users to the implementation.
|
||||||
</PARA>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</REFENTRY>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
sgml-omittag:t
|
sgml-omittag:nil
|
||||||
sgml-shorttag:t
|
sgml-shorttag:t
|
||||||
sgml-minimize-attributes:nil
|
sgml-minimize-attributes:nil
|
||||||
sgml-always-quote-attributes:t
|
sgml-always-quote-attributes:t
|
||||||
|
@ -1,180 +1,201 @@
|
|||||||
<REFENTRY ID="SQL-BEGINWORK">
|
<refentry id="SQL-BEGINWORK">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle id="SQL-BEGINWORK-TITLE">
|
||||||
BEGIN WORK
|
BEGIN
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
BEGIN WORK
|
BEGIN
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Begins a transaction in chained mode
|
Begins a transaction in chained mode
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1999-06-11</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
BEGIN [ WORK | TRANSACTION ]
|
BEGIN [ WORK | TRANSACTION ]
|
||||||
</SYNOPSIS>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-BEGINWORK-1">
|
<refsect2 id="R2-SQL-BEGINWORK-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1999-06-11</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
None
|
None
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-BEGINWORK-2">
|
<refsect2 id="R2-SQL-BEGINWORK-2">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1999-06-11</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
|
||||||
|
|
||||||
<VARIABLELIST>
|
<para>
|
||||||
<VARLISTENTRY>
|
<variablelist>
|
||||||
<TERM>
|
<varlistentry>
|
||||||
<returnvalue>BEGIN</returnvalue>
|
<term>
|
||||||
</TERM>
|
<returnvalue>BEGIN</returnvalue>
|
||||||
<LISTITEM>
|
</term>
|
||||||
<PARA>
|
<listitem>
|
||||||
This signifies that a new transaction has been started.
|
<para>
|
||||||
</PARA>
|
This signifies that a new transaction has been started.
|
||||||
</LISTITEM>
|
</para>
|
||||||
</VARLISTENTRY>
|
</listitem>
|
||||||
<VARLISTENTRY>
|
</varlistentry>
|
||||||
<TERM>
|
<varlistentry>
|
||||||
<returnvalue>NOTICE: BeginTransactionBlock and not in default state</returnvalue>
|
<term>
|
||||||
</TERM>
|
<returnvalue>NOTICE: BeginTransactionBlock and not in default state</returnvalue>
|
||||||
<LISTITEM>
|
</term>
|
||||||
<PARA>
|
<listitem>
|
||||||
|
<para>
|
||||||
This indicates that a transaction was already in progress.
|
This indicates that a transaction was already in progress.
|
||||||
The current transaction is not affected.
|
The current transaction is not affected.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</VARIABLELIST>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</REFSYNOPSISDIV>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-BEGINWORK-1">
|
<refsect1 id="R1-SQL-BEGINWORK-1">
|
||||||
<REFSECT1INFO>
|
<refsect1info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1999-06-11</date>
|
||||||
</REFSECT1INFO>
|
</refsect1info>
|
||||||
<TITLE>
|
<title>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
By default, <productname>Postgres</productname> executes transactions
|
By default, <productname>Postgres</productname> executes transactions
|
||||||
in unchained mode (also known as autocommit feature in other DBMSes).
|
in <firstterm>unchained mode</firstterm>
|
||||||
|
(also known as <quote>autocommit</quote> in other database
|
||||||
|
systems).
|
||||||
In other words, each user statement is executed in its own transaction
|
In other words, each user statement is executed in its own transaction
|
||||||
and commit is implicit (if execution was successfull).
|
and a commit is implicitly performed at the end of the statement
|
||||||
|
(if execution was successful, otherwise a rollback is done).
|
||||||
<command>BEGIN</command> initiates a user transaction in chained mode,
|
<command>BEGIN</command> initiates a user transaction in chained mode,
|
||||||
i.e. all user statements after <command>BEGIN</command> command will
|
i.e. all user statements after <command>BEGIN</command> command will
|
||||||
be executed in single transaction untill explicit COMMIT, ROLLBACK
|
be executed in a single transaction until an explicit COMMIT, ROLLBACK
|
||||||
or execution abort. Statements in chained mode are executed much faster,
|
or execution abort. Statements in chained mode are executed much faster,
|
||||||
because of transaction start/commit requires significant CPU and disk
|
because transaction start/commit requires significant CPU and disk
|
||||||
activity. This mode is also required for consistency when changing
|
activity. Execution of multiple statements inside a transaction
|
||||||
one of related tables.
|
is also required for consistency when changing several
|
||||||
|
related tables.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Default transaction isolation level in <productname>Postgres</productname>
|
The default transaction isolation level in
|
||||||
is READ COMMITTED one, when queries inside transaction see only changes
|
<productname>Postgres</productname>
|
||||||
|
is READ COMMITTED, where queries inside the transaction see only changes
|
||||||
committed before query execution. So, you have to use
|
committed before query execution. So, you have to use
|
||||||
<command>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE</command>
|
<command>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE</command>
|
||||||
command just after BEGIN if you need in better transaction isolation.
|
just after BEGIN if you need more rigorous transaction isolation.
|
||||||
In SERIALIZABLE mode queries will see only changes committed before entire
|
In SERIALIZABLE mode queries will see only changes committed before
|
||||||
transaction began (actually, before execution of first DML statement
|
the entire
|
||||||
in serializable transaction).
|
transaction began (actually, before execution of the first DML statement
|
||||||
|
in a serializable transaction).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If the transaction is committed, <productname>Postgres</productname>
|
If the transaction is committed, <productname>Postgres</productname>
|
||||||
will ensure either that all updates are done or else that none of
|
will ensure either that all updates are done or else that none of
|
||||||
them are done. Transactions have the standard ACID
|
them are done. Transactions have the standard <acronym>ACID</acronym>
|
||||||
(atomic, consistent, isolatable, and durable) property.
|
(atomic, consistent, isolatable, and durable) property.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-BEGINWORK-3">
|
<refsect2 id="R2-SQL-BEGINWORK-3">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1999-06-11</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
The keyword TRANSACTION is just a cosmetic alternative to WORK.
|
The keyword TRANSACTION is just a cosmetic alternative to WORK.
|
||||||
Neither keyword need be specified.
|
Neither keyword need be specified.
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<PARA>
|
<para>
|
||||||
Refer to the <command>LOCK</command> statement for further information
|
Refer to the <command>LOCK</command> statement for further information
|
||||||
about locking tables inside a transaction.
|
about locking tables inside a transaction.
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<PARA>
|
<para>
|
||||||
Use <command>COMMIT</command> or <command>ROLLBACK</command>
|
Use <xref linkend="SQL-COMMIT-TITLE" endterm="SQL-COMMIT-TITLE">
|
||||||
|
or
|
||||||
|
<xref linkend="SQL-ROLLBACK-TITLE" endterm="SQL-ROLLBACK-TITLE">
|
||||||
to terminate a transaction.
|
to terminate a transaction.
|
||||||
</PARA>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-BEGINWORK-2">
|
|
||||||
<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;
|
BEGIN WORK;
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-BEGINWORK-3">
|
<refsect1 id="R1-SQL-BEGINWORK-3">
|
||||||
<TITLE>
|
<title>
|
||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<command>BEGIN</command>
|
<command>BEGIN</command>
|
||||||
is a <productname>Postgres</productname> language extension.
|
is a <productname>Postgres</productname> language extension.
|
||||||
</para>
|
</para>
|
||||||
<REFSECT2 ID="R2-SQL-BEGINWORK-4">
|
<refsect2 id="R2-SQL-BEGINWORK-4">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1999-06-11</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
There is no explicit BEGIN WORK command in <acronym>SQL92</acronym>;
|
There is no explicit BEGIN WORK command in <acronym>SQL92</acronym>;
|
||||||
transaction initiation is always implicit and it terminates either
|
transaction initiation is always implicit and it terminates either
|
||||||
with a COMMIT or with a ROLLBACK statement.
|
with a COMMIT or with a ROLLBACK statement.
|
||||||
</PARA>
|
|
||||||
<PARA>
|
<note>
|
||||||
<acronym>SQL92</acronym> also requires SERIALIZABLE to be default
|
<para>
|
||||||
|
Many relational database systems offer an autocommit feature as a
|
||||||
|
convenience.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<acronym>SQL92</acronym> also requires SERIALIZABLE to be the default
|
||||||
transaction isolation level.
|
transaction isolation level.
|
||||||
</PARA>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</REFENTRY>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
sgml-omittag:t
|
sgml-omittag:nil
|
||||||
sgml-shorttag:t
|
sgml-shorttag:t
|
||||||
sgml-minimize-attributes:nil
|
sgml-minimize-attributes:nil
|
||||||
sgml-always-quote-attributes:t
|
sgml-always-quote-attributes:t
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
&createRule;
|
&createRule;
|
||||||
&createSequence;
|
&createSequence;
|
||||||
&createTable;
|
&createTable;
|
||||||
|
&createTableAs;
|
||||||
&createTrigger;
|
&createTrigger;
|
||||||
&createType;
|
&createType;
|
||||||
&createUser;
|
&createUser;
|
||||||
@ -57,6 +58,7 @@
|
|||||||
&revoke;
|
&revoke;
|
||||||
&rollback;
|
&rollback;
|
||||||
&select;
|
&select;
|
||||||
|
&selectInto;
|
||||||
&set;
|
&set;
|
||||||
&show;
|
&show;
|
||||||
&unlisten;
|
&unlisten;
|
||||||
|
@ -1,141 +1,142 @@
|
|||||||
<REFENTRY ID="SQL-COMMIT">
|
<refentry id="SQL-COMMIT">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle id="SQL-COMMIT-TITLE">
|
||||||
COMMIT
|
COMMIT
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
COMMIT
|
COMMIT
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Commits the current transaction
|
Commits the current transaction
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
COMMIT [ WORK | TRANSACTION ]
|
COMMIT [ WORK | TRANSACTION ]
|
||||||
</SYNOPSIS>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-COMMIT-1">
|
<refsect2 id="R2-SQL-COMMIT-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
None
|
None
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-COMMIT-2">
|
<refsect2 id="R2-SQL-COMMIT-2">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<returnvalue>END</returnvalue>
|
<returnvalue>END</returnvalue>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
Message returned if the transaction is successfully committed.
|
Message returned if the transaction is successfully committed.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<returnvalue>NOTICE EndTransactionBlock and not inprogress/abort state</returnvalue>
|
<returnvalue>NOTICE EndTransactionBlock and not inprogress/abort state</returnvalue>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
If there is no transaction in progress.
|
If there is no transaction in progress.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</VARIABLELIST>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</REFSYNOPSISDIV>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-COMMIT-1">
|
<refsect1 id="R1-SQL-COMMIT-1">
|
||||||
<REFSECT1INFO>
|
<refsect1info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT1INFO>
|
</refsect1info>
|
||||||
<TITLE>
|
<title>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<command>COMMIT</command> commits the current transaction. All
|
<command>COMMIT</command> commits the current transaction. All
|
||||||
changes made by the transaction become visible to others
|
changes made by the transaction become visible to others
|
||||||
and are guaranteed to be durable if a crash occurs.
|
and are guaranteed to be durable if a crash occurs.
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-COMMIT-3">
|
<refsect2 id="R2-SQL-COMMIT-3">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-08</DATE>
|
<date>1998-09-08</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
|
||||||
The keywords WORK and TRANSACTION are noise and can be omitted.
|
|
||||||
</PARA>
|
|
||||||
<para>
|
<para>
|
||||||
Use the <command>ROLLBACK</command> statement to abort a transaction.
|
The keywords WORK and TRANSACTION are noise and can be omitted.
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-COMMIT-2">
|
<para>
|
||||||
<TITLE>
|
Use <xref linkend="SQL-ROLLBACK-TITLE" endterm="SQL-ROLLBACK-TITLE">
|
||||||
Usage
|
to abort a transaction.
|
||||||
</TITLE>
|
</para>
|
||||||
<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>
|
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</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
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
sgml-omittag:t
|
sgml-omittag:nil
|
||||||
sgml-shorttag:t
|
sgml-shorttag:t
|
||||||
sgml-minimize-attributes:nil
|
sgml-minimize-attributes:nil
|
||||||
sgml-always-quote-attributes:t
|
sgml-always-quote-attributes:t
|
||||||
|
@ -1,173 +1,173 @@
|
|||||||
<REFENTRY ID="SQL-CREATEFUNCTION">
|
<refentry id="SQL-CREATEFUNCTION">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle>
|
||||||
CREATE FUNCTION
|
CREATE FUNCTION
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
CREATE FUNCTION
|
CREATE FUNCTION
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Defines a new function
|
Defines a new function
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-09</DATE>
|
<date>1998-09-09</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">ftype</replaceable> [, ...] ] )
|
CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">ftype</replaceable> [, ...] ] )
|
||||||
RETURNS <replaceable class="parameter">rtype</replaceable>
|
RETURNS <replaceable class="parameter">rtype</replaceable>
|
||||||
AS <replaceable class="parameter">definition</replaceable>
|
AS <replaceable class="parameter">definition</replaceable>
|
||||||
LANGUAGE '<replaceable class="parameter">langname</replaceable>'
|
LANGUAGE '<replaceable class="parameter">langname</replaceable>'
|
||||||
</SYNOPSIS>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-1">
|
<refsect2 id="R2-SQL-CREATEFUNCTION-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-09</DATE>
|
<date>1998-09-09</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<replaceable class="parameter">name</replaceable>
|
<replaceable class="parameter">name</replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The name of a function to create.
|
The name of a function to create.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<replaceable class="parameter">ftype</replaceable>
|
<replaceable class="parameter">ftype</replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The data type of function arguments.
|
The data type of function arguments.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<replaceable class="parameter">rtype</replaceable>
|
<replaceable class="parameter">rtype</replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The return data type.
|
The return data type.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<replaceable class="parameter">definition</replaceable>
|
<replaceable class="parameter">definition</replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
A string defining the function; the meaning depends on the language.
|
A string defining the function; the meaning depends on the language.
|
||||||
It may be an internal function name, the path to an object file,
|
It may be an internal function name, the path to an object file,
|
||||||
an SQL query, or text in a procedural language.
|
an SQL query, or text in a procedural language.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<replaceable class="parameter">langname</replaceable>
|
<replaceable class="parameter">langname</replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
may be '<literal>C</literal>', '<literal>sql</literal>',
|
may be '<literal>C</literal>', '<literal>sql</literal>',
|
||||||
'<literal>internal</literal>'
|
'<literal>internal</literal>'
|
||||||
or '<replaceable class="parameter">plname</replaceable>',
|
or '<replaceable class="parameter">plname</replaceable>',
|
||||||
where '<replaceable class="parameter">plname</replaceable>'
|
where '<replaceable class="parameter">plname</replaceable>'
|
||||||
is the name of a created procedural
|
is the name of a created procedural
|
||||||
language. See <command>CREATE LANGUAGE</command> for details.
|
language. See <command>CREATE LANGUAGE</command> for details.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-2">
|
<refsect2 id="R2-SQL-CREATEFUNCTION-2">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-09</DATE>
|
<date>1998-09-09</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<ReturnValue>CREATE</ReturnValue>
|
<returnvalue>CREATE</returnvalue>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
This is returned if the command completes successfully.
|
This is returned if the command completes successfully.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</VARIABLELIST>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</REFSYNOPSISDIV>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-1">
|
<refsect1 id="R1-SQL-CREATEFUNCTION-1">
|
||||||
<REFSECT1INFO>
|
<refsect1info>
|
||||||
<DATE>1998-09-09</DATE>
|
<date>1998-09-09</date>
|
||||||
</REFSECT1INFO>
|
</refsect1info>
|
||||||
<TITLE>
|
<title>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<command>CREATE FUNCTION</command> allows a
|
<command>CREATE FUNCTION</command> allows a
|
||||||
<productname>Postgres</productname> user
|
<productname>Postgres</productname> user
|
||||||
to register a function
|
to register a function
|
||||||
with a database. Subsequently, this user is treated as the
|
with a database. Subsequently, this user is treated as the
|
||||||
owner of the function.
|
owner of the function.
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-3">
|
<refsect2 id="R2-SQL-CREATEFUNCTION-3">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-09</DATE>
|
<date>1998-09-09</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
Refer to the chapter on functions
|
Refer to the chapter on functions
|
||||||
in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
||||||
for further information.
|
for further information.
|
||||||
</PARA>
|
</para>
|
||||||
<PARA>
|
<para>
|
||||||
Use <command>DROP FUNCTION</command>
|
Use <command>DROP FUNCTION</command>
|
||||||
to drop user-defined functions.
|
to drop user-defined functions.
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<PARA>
|
<para>
|
||||||
<productname>Postgres</productname> allows function "overloading";
|
<productname>Postgres</productname> allows function "overloading";
|
||||||
that is, the same name can be used for several different functions
|
that is, the same name can be used for several different functions
|
||||||
so long as they have distinct argument types. This facility must be
|
so long as they have distinct argument types. This facility must be
|
||||||
used with caution for INTERNAL and C-language functions, however.
|
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
|
Two INTERNAL functions cannot have the same C name without causing
|
||||||
errors at link time. To get around that, give them different C names
|
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
|
(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>.
|
specify those names in the AS clause of <command>CREATE FUNCTION</command>.
|
||||||
If the AS clause is left empty then <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.
|
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
|
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
|
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
|
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
|
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
|
for you today, you might regret overloading names later when you try
|
||||||
to run the code somewhere else.
|
to run the code somewhere else.
|
||||||
</PARA>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-2">
|
<refsect1 id="R1-SQL-CREATEFUNCTION-2">
|
||||||
<TITLE>
|
<title>
|
||||||
Usage
|
Usage
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
To create a simple SQL function:
|
To create a simple SQL function:
|
||||||
</PARA>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
CREATE FUNCTION one() RETURNS int4
|
CREATE FUNCTION one() RETURNS int4
|
||||||
AS 'SELECT 1 AS RESULT'
|
AS 'SELECT 1 AS RESULT'
|
||||||
LANGUAGE 'sql';
|
LANGUAGE 'sql';
|
||||||
@ -201,7 +201,7 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
|||||||
------
|
------
|
||||||
1
|
1
|
||||||
</computeroutput>
|
</computeroutput>
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
To create a C function, calling a routine from a user-created
|
To create a C function, calling a routine from a user-created
|
||||||
shared library. This particular routine calculates a check
|
shared library. This particular routine calculates a check
|
||||||
@ -211,44 +211,44 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
<userinput>
|
<userinput>
|
||||||
CREATE FUNCTION ean_checkdigit(bpchar, bpchar) RETURNS bool
|
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
|
CREATE TABLE product (
|
||||||
(
|
id char(8) PRIMARY KEY,
|
||||||
id char(8) PRIMARY KEY,
|
eanprefix char(8) CHECK (eanprefix ~ '[0-9]{2}-[0-9]{5}')
|
||||||
eanprefix char(8) CHECK (eanprefix ~ '[0-9]{2}-[0-9]{5}')
|
REFERENCES brandname(ean_prefix),
|
||||||
REFERENCES brandname(ean_prefix),
|
eancode char(6) CHECK (eancode ~ '[0-9]{6}'),
|
||||||
eancode char(6) CHECK (eancode ~ '[0-9]{6}'),
|
CONSTRAINT ean CHECK (ean_checkdigit(eanprefix, eancode))
|
||||||
CONSTRAINT ean CHECK (ean_checkdigit(eanprefix, eancode))
|
);
|
||||||
);</userinput>
|
</userinput>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</REFSECT1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-3">
|
<refsect1 id="R1-SQL-CREATEFUNCTION-3">
|
||||||
<TITLE>
|
<title>
|
||||||
Bugs
|
Bugs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
A C function cannot return a set of values.
|
A C function cannot return a set of values.
|
||||||
</PARA>
|
</para>
|
||||||
</REFSECT1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-CREATEFUNCTION-4">
|
<refsect1 id="R1-SQL-CREATEFUNCTION-4">
|
||||||
<TITLE>
|
<title>
|
||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<command>CREATE FUNCTION</command> is
|
<command>CREATE FUNCTION</command> is
|
||||||
a <productname>Postgres</productname> language extension.
|
a <productname>Postgres</productname> language extension.
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEFUNCTION-4">
|
<refsect2 id="R2-SQL-CREATEFUNCTION-4">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-09</DATE>
|
<date>1998-09-09</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
SQL/PSM
|
SQL/PSM
|
||||||
</TITLE>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
<note>
|
<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:
|
SQL/PSM <command>CREATE FUNCTION</command> has the following syntax:
|
||||||
<synopsis>
|
<synopsis>
|
||||||
CREATE FUNCTION <replaceable class="parameter">name</replaceable>
|
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>
|
RETURNS <replaceable class="parameter">rtype</replaceable>
|
||||||
LANGUAGE '<replaceable class="parameter">langname</replaceable>'
|
LANGUAGE '<replaceable class="parameter">langname</replaceable>'
|
||||||
ESPECIFIC <replaceable class="parameter">routine</replaceable>
|
ESPECIFIC <replaceable class="parameter">routine</replaceable>
|
||||||
@ -274,12 +275,12 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable>
|
|||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</REFENTRY>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
sgml-omittag:t
|
sgml-omittag:nil
|
||||||
sgml-shorttag:t
|
sgml-shorttag:t
|
||||||
sgml-minimize-attributes:nil
|
sgml-minimize-attributes:nil
|
||||||
sgml-always-quote-attributes:t
|
sgml-always-quote-attributes:t
|
||||||
|
File diff suppressed because it is too large
Load Diff
117
doc/src/sgml/ref/create_table_as.sgml
Normal file
117
doc/src/sgml/ref/create_table_as.sgml
Normal file
@ -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">
|
<refentry id="SQL-CREATEUSER">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle>
|
||||||
CREATE USER
|
CREATE USER
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
CREATE USER
|
CREATE USER
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Creates account information for a new user
|
Creates account information for a new user
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-21</DATE>
|
<date>1998-09-21</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
CREATE USER<REPLACEABLE CLASS="PARAMETER"> username</REPLACEABLE>
|
CREATE USER<replaceable class="PARAMETER"> username</replaceable>
|
||||||
[ WITH PASSWORD <REPLACEABLE CLASS="PARAMETER">password</REPLACEABLE> ]
|
[ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
|
||||||
[ CREATEDB | NOCREATEDB ]
|
[ CREATEDB | NOCREATEDB ]
|
||||||
[ CREATEUSER | NOCREATEUSER ]
|
[ CREATEUSER | NOCREATEUSER ]
|
||||||
[ IN GROUP <REPLACEABLE CLASS="PARAMETER">groupname</REPLACEABLE> [, ...] ]
|
[ IN GROUP <replaceable class="PARAMETER">groupname</replaceable> [, ...] ]
|
||||||
[ VALID UNTIL '<REPLACEABLE CLASS="PARAMETER">abstime</REPLACEABLE>' ]
|
[ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
|
||||||
</SYNOPSIS>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEUSER-1">
|
<refsect2 id="R2-SQL-CREATEUSER-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-21</DATE>
|
<date>1998-09-21</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<ReturnValue><replaceable class="parameter">username</replaceable></ReturnValue>
|
<returnvalue><replaceable class="parameter">username</replaceable></returnvalue>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The name of the user.
|
The name of the user.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>
|
<varlistentry>
|
||||||
<ReturnValue><replaceable class="parameter">password</replaceable></ReturnValue>
|
<term>
|
||||||
</TERM>
|
<returnvalue><replaceable class="parameter">password</replaceable></returnvalue>
|
||||||
<LISTITEM>
|
</term>
|
||||||
<PARA>
|
<listitem>
|
||||||
The WITH PASSWORD clause sets the user's password within
|
<para>
|
||||||
the "<filename>pg_shadow</filename>" table. For this reason,
|
The WITH PASSWORD clause sets the user's password within
|
||||||
<filename>"pg_shadow</filename>" is no
|
the "<filename>pg_shadow</filename>" table. For this reason,
|
||||||
longer accessible to the instance of <productname>Postgres</productname> that the
|
<filename>"pg_shadow</filename>" is no
|
||||||
<productname>Postgres</productname> user's password is initially set to NULL.
|
longer accessible to the instance of
|
||||||
<comment>The text here has got garbled.</comment>
|
<productname>Postgres</productname> that the
|
||||||
When a
|
<productname>Postgres</productname>
|
||||||
user's password in the "<filename>pg_shadow</filename>"
|
user's password is initially set to NULL.
|
||||||
table is NULL, user
|
</para>
|
||||||
authentication proceeds as it historically has (HBA,
|
<para>
|
||||||
PG_PASSWORD, etc). However, if a password is set for a
|
When a
|
||||||
user, a new authentication system supplants any other
|
user's password in the "<filename>pg_shadow</filename>"
|
||||||
configured for the <productname>Postgres</productname> instance, and the password
|
table is NULL, user
|
||||||
stored in the "<filename>pg_shadow</filename>" table is used
|
authentication proceeds as it historically has (HBA,
|
||||||
for authentication.
|
PG_PASSWORD, etc). However, if a password is set for a
|
||||||
For more details on how this authentication system
|
user, a new authentication system supplants any other
|
||||||
functions see pg_crypt(3). If the WITH PASSWORD clause is
|
configured for the <productname>Postgres</productname>
|
||||||
omitted, the user's password is set to the empty
|
instance, and the password
|
||||||
string with equates to a NULL value in the authentication
|
stored in the "<filename>pg_shadow</filename>" table is used
|
||||||
system mentioned above.
|
for authentication.
|
||||||
</PARA>
|
For more details on how this authentication system
|
||||||
</LISTITEM>
|
functions see pg_crypt(3). If the WITH PASSWORD clause is
|
||||||
</VARLISTENTRY>
|
omitted, the user's password is set to the empty
|
||||||
<VARLISTENTRY>
|
string which equates to a NULL value in the authentication
|
||||||
<TERM>
|
system mentioned above.
|
||||||
<ReturnValue> CREATEDB/NOCREATEDB</ReturnValue>
|
</para>
|
||||||
</TERM>
|
</listitem>
|
||||||
<LISTITEM>
|
</varlistentry>
|
||||||
<PARA>
|
|
||||||
These clauses define a user's ability to create databases.
|
<varlistentry>
|
||||||
If CREATEDB is specified, the user being defined will
|
<term>
|
||||||
be allowed to create his own databases. Using NOCREATEDB
|
<returnvalue> CREATEDB/NOCREATEDB</returnvalue>
|
||||||
will deny a user the ability to create databases. If this
|
</term>
|
||||||
clause is omitted, NOCREATEDB is used by default.
|
<listitem>
|
||||||
</PARA>
|
<para>
|
||||||
</LISTITEM>
|
These clauses define a user's ability to create databases.
|
||||||
</VARLISTENTRY>
|
If CREATEDB is specified, the user being defined will
|
||||||
<VARLISTENTRY>
|
be allowed to create his own databases. Using NOCREATEDB
|
||||||
<TERM>
|
will deny a user the ability to create databases. If this
|
||||||
<ReturnValue>CREATEUSER/NOCREATEUSER</ReturnValue>
|
clause is omitted, NOCREATEDB is used by default.
|
||||||
</TERM>
|
</para>
|
||||||
<LISTITEM>
|
</listitem>
|
||||||
<PARA>
|
</varlistentry>
|
||||||
These clauses determine whether a user will be permitted to
|
|
||||||
create new
|
<varlistentry>
|
||||||
users in an instance of <productname>Postgres</productname>.
|
<term>
|
||||||
Omitting this clause will set the user's value of this
|
<returnvalue>CREATEUSER/NOCREATEUSER</returnvalue>
|
||||||
attribute to be NOCREATEUSER.
|
</term>
|
||||||
</PARA>
|
<listitem>
|
||||||
</LISTITEM>
|
<para>
|
||||||
</VARLISTENTRY>
|
These clauses determine whether a user will be permitted to
|
||||||
<VARLISTENTRY>
|
create new
|
||||||
<TERM>
|
users in an instance of <productname>Postgres</productname>.
|
||||||
<ReturnValue><replaceable class="parameter">groupname</replaceable></ReturnValue>
|
Omitting this clause will set the user's value of this
|
||||||
</TERM>
|
attribute to be NOCREATEUSER.
|
||||||
<LISTITEM>
|
</para>
|
||||||
<PARA>
|
</listitem>
|
||||||
A name of a group into which to insert the user as a new member.
|
</varlistentry>
|
||||||
</PARA>
|
|
||||||
</LISTITEM>
|
<varlistentry>
|
||||||
</VARLISTENTRY>
|
<term>
|
||||||
<VARLISTENTRY>
|
<returnvalue><replaceable class="parameter">groupname</replaceable></returnvalue>
|
||||||
<TERM>
|
</term>
|
||||||
<ReturnValue><replaceable class="parameter">abstime</replaceable></ReturnValue>
|
<listitem>
|
||||||
</TERM>
|
<para>
|
||||||
<LISTITEM>
|
A name of a group into which to insert the user as a new member.
|
||||||
<PARA>
|
</para>
|
||||||
The VALID UNTIL clause sets an absolute time after which the
|
</listitem>
|
||||||
user's <productname>Postgres</productname> login is no longer valid. Please note that
|
</varlistentry>
|
||||||
if a user does not have a password defined in the
|
|
||||||
"<filename>pg_shadow</filename>"
|
<varlistentry>
|
||||||
table, the valid until date will not be checked
|
<term>
|
||||||
during user authentication. If this clause is omitted,
|
<returnvalue><replaceable class="parameter">abstime</replaceable></returnvalue>
|
||||||
a NULL value is stored in "<filename>pg_shadow</filename>"
|
</term>
|
||||||
for this attribute,
|
<listitem>
|
||||||
and the login will be valid for all time.
|
<para>
|
||||||
</PARA>
|
The VALID UNTIL clause sets an absolute time after which the
|
||||||
</LISTITEM>
|
user's <productname>Postgres</productname>
|
||||||
</VARLISTENTRY>
|
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>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEUSER-2">
|
<refsect2 id="R2-SQL-CREATEUSER-2">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-21</DATE>
|
<date>1998-09-21</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
|
||||||
</PARA>
|
<para>
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<ReturnValue>CREATE USER</ReturnValue>
|
<returnvalue>CREATE USER</returnvalue>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
Message returned if the command completes successfully.
|
Message returned if the command completes successfully.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>
|
<varlistentry>
|
||||||
<ReturnValue>ERROR: removeUser: user "<replaceable class="parameter">username</replaceable>" does not exist</ReturnValue>
|
<term>
|
||||||
</TERM>
|
<returnvalue>ERROR: removeUser: user "<replaceable
|
||||||
<LISTITEM>
|
class="parameter">username</replaceable>" does not exist</returnvalue>
|
||||||
<PARA>
|
</term>
|
||||||
if "<replaceable class="parameter">username</replaceable>" not found.
|
<listitem>
|
||||||
</PARA>
|
<para>
|
||||||
<comment>I don't understand this and I don't know how to get
|
if "<replaceable class="parameter">username</replaceable>" not found.
|
||||||
this error message.</comment>
|
</para>
|
||||||
</listitem>
|
<comment>I don't understand this and I don't know how to get
|
||||||
</varlistentry>
|
this error message.</comment>
|
||||||
</VARIABLELIST>
|
</listitem>
|
||||||
</REFSECT2>
|
</varlistentry>
|
||||||
</REFSYNOPSISDIV>
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</refsect2>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-CREATEUSER-1">
|
<refsect1 id="R1-SQL-CREATEUSER-1">
|
||||||
<REFSECT1INFO>
|
<refsect1info>
|
||||||
<DATE>1998-09-21</DATE>
|
<date>1998-09-21</date>
|
||||||
</REFSECT1INFO>
|
</refsect1info>
|
||||||
<TITLE>
|
<title>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
CREATE USER will add a new user to an instance of
|
CREATE USER will add a new user to an instance of
|
||||||
<productname>Postgres</productname>.
|
<productname>Postgres</productname>.
|
||||||
</PARA>
|
</para>
|
||||||
<PARA>
|
<para>
|
||||||
The new user will be given a <filename>usesysid</filename> of:
|
The new user will be given a <filename>usesysid</filename> of:
|
||||||
'<command>SELECT MAX(usesysid) + 1 FROM pg_shadow</command>'.
|
'<command>SELECT MAX(usesysid) + 1 FROM pg_shadow</command>'.
|
||||||
This means that
|
This means that
|
||||||
@ -196,18 +209,18 @@ CREATE USER<REPLACEABLE CLASS="PARAMETER"> username</REPLACEABLE>
|
|||||||
for any given user,
|
for any given user,
|
||||||
use the "createuser" script provided with the <productname>Postgres</productname>
|
use the "createuser" script provided with the <productname>Postgres</productname>
|
||||||
distribution.
|
distribution.
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEUSER-3">
|
<refsect2 id="R2-SQL-CREATEUSER-3">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-21</DATE>
|
<date>1998-09-21</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
CREATE USER statement is a <productname>Postgres</productname> language extension.
|
CREATE USER statement is a <productname>Postgres</productname> language extension.
|
||||||
</PARA>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Use DROP USER or ALTER USER statements to remove or modify a user
|
Use DROP USER or ALTER USER statements to remove or modify a user
|
||||||
account.</para>
|
account.</para>
|
||||||
@ -229,68 +242,67 @@ CREATE USER<REPLACEABLE CLASS="PARAMETER"> username</REPLACEABLE>
|
|||||||
| valuntil | abstime | 4 |
|
| valuntil | abstime | 4 |
|
||||||
+--------------------------+--------------------------+-------+
|
+--------------------------+--------------------------+-------+
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-CREATEUSER-2">
|
<refsect1 id="R1-SQL-CREATEUSER-2">
|
||||||
<TITLE>
|
<title>
|
||||||
Usage
|
Usage
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
Create a user with no password:
|
Create a user with no password:
|
||||||
</PARA>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
CREATE USER jonathan
|
CREATE USER jonathan
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
<PARA>
|
<para>
|
||||||
Create a user with a password:
|
Create a user with a password:
|
||||||
</PARA>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
CREATE USER davide WITH PASSWORD jw8s0F4
|
CREATE USER davide WITH PASSWORD jw8s0F4
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Create a user with a password, whose account is valid until the end of 2001.
|
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
|
Note that after one second has ticked in 2002, the account is not
|
||||||
valid:
|
valid:
|
||||||
</para>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
CREATE USER miriam WITH PASSWORD jw8s0F4 VALID UNTIL 'Jan 1 2002'
|
CREATE USER miriam WITH PASSWORD jw8s0F4 VALID UNTIL 'Jan 1 2002'
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Create an account where the user can create databases:
|
Create an account where the user can create databases:
|
||||||
</para>
|
</para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
CREATE USER manuel WITH PASSWORD jw8s0F4 CREATEDB
|
CREATE USER manuel WITH PASSWORD jw8s0F4 CREATEDB
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
|
|
||||||
</REFSECT1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-CREATEUSER-3">
|
<refsect1 id="R1-SQL-CREATEUSER-3">
|
||||||
<TITLE>
|
<title>
|
||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
</PARA>
|
</para>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-CREATEUSER-4">
|
<refsect2 id="R2-SQL-CREATEUSER-4">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-21</DATE>
|
<date>1998-09-21</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
There is no CREATE USER statement in SQL92.
|
There is no CREATE USER statement in SQL92.
|
||||||
</PARA>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</REFENTRY>
|
</refentry>
|
||||||
|
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
sgml-omittag:t
|
sgml-omittag:nil
|
||||||
sgml-shorttag:t
|
sgml-shorttag:t
|
||||||
sgml-minimize-attributes:nil
|
sgml-minimize-attributes:nil
|
||||||
sgml-always-quote-attributes:t
|
sgml-always-quote-attributes:t
|
||||||
|
@ -22,7 +22,8 @@ pg_dump [ <replaceable class="parameter">dbname</replaceable> ]
|
|||||||
pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ]
|
pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ]
|
||||||
[ -t <replaceable class="parameter">table</replaceable> ]
|
[ -t <replaceable class="parameter">table</replaceable> ]
|
||||||
[ -f <replaceable class="parameter">outputfile</replaceable> ]
|
[ -f <replaceable class="parameter">outputfile</replaceable> ]
|
||||||
[ -a ] [ -c ] [ -d ] [ -D ] [ -n ] [ -N ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
|
[ -a ] [ -c ] [ -d ] [ -D ] [ -n ] [ -N ]
|
||||||
|
[ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
|
||||||
[ <replaceable class="parameter">dbname</replaceable> ]
|
[ <replaceable class="parameter">dbname</replaceable> ]
|
||||||
</SYNOPSIS>
|
</SYNOPSIS>
|
||||||
|
|
||||||
|
@ -206,7 +206,8 @@ postgres [ -B <replaceable class="parameter">nBuffers</replaceable> ] [ -C ] [ -
|
|||||||
"American" format (<literal>MM-DD-YYYY</literal>).
|
"American" format (<literal>MM-DD-YYYY</literal>).
|
||||||
Dates are accepted by the backend in a wide variety of formats,
|
Dates are accepted by the backend in a wide variety of formats,
|
||||||
and for input dates this switch mostly affects the interpretation
|
and for input dates this switch mostly affects the interpretation
|
||||||
for ambiguous cases. See <xref linkend="datatype" endterm="datatype">
|
for ambiguous cases.
|
||||||
|
See <xref linkend="datatype-title" endterm="datatype-title">
|
||||||
for more information.
|
for more information.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,142 +1,158 @@
|
|||||||
<REFENTRY ID="SQL-RESET">
|
<refentry id="SQL-RESET">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle>
|
||||||
RESET
|
RESET
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
RESET
|
RESET
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Restores run-time parameters for session to default values
|
Restores run-time parameters for session to default values
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
RESET <replaceable class="PARAMETER">variable</replaceable>
|
||||||
</SYNOPSIS>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-1">
|
<refsect2 id="R2-SQL-RESET-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
<replaceable class="PARAMETER">variable</replaceable>
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
Refer to the SET statement for more information on available
|
Refer to the SET statement for more information on available
|
||||||
variables.
|
variables.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-2">
|
<refsect2 id="R2-SQL-RESET-2">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
|
|
||||||
<VARIABLELIST>
|
<variablelist>
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
RESET VARIABLE
|
RESET VARIABLE
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
Message returned if
|
Message returned if
|
||||||
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is successfully reset
|
<replaceable class="PARAMETER">variable</replaceable> is successfully reset
|
||||||
to its default value..
|
to its default value..
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</VARIABLELIST>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
</REFSYNOPSISDIV>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-RESET-1">
|
<refsect1 id="R1-SQL-RESET-1">
|
||||||
<REFSECT1INFO>
|
<refsect1info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT1INFO>
|
</refsect1info>
|
||||||
<TITLE>
|
<title>
|
||||||
Description
|
Description
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<command>RESET</command> restores variables to the
|
<command>RESET</command> restores variables to the
|
||||||
default values.
|
default values.
|
||||||
Refer to the <command>SET</command> command for details on
|
Refer to the <command>SET</command> command for details on
|
||||||
allowed values and defaults.
|
allowed values and defaults.
|
||||||
<command>RESET</command> is an alternate form for
|
<command>RESET</command> is an alternate form for
|
||||||
<synopsis>
|
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command>
|
||||||
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command>
|
</para>
|
||||||
</synopsis>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-3">
|
<refsect2 id="R2-SQL-RESET-3">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Notes
|
Notes
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
The RESET statement is a <productname>Postgres</productname> language extension.
|
The RESET statement is a <productname>Postgres</productname>
|
||||||
</para>
|
language extension.
|
||||||
<para>
|
</para>
|
||||||
Refer to SET/SHOW statements to set/show variable values.
|
<para>
|
||||||
</para>
|
Refer to SET/SHOW statements to set/show variable values.
|
||||||
</REFSECT2>
|
</para>
|
||||||
</refsect1>
|
</refsect2>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-RESET-2">
|
<refsect1 id="R1-SQL-RESET-2">
|
||||||
<TITLE>
|
<title>
|
||||||
Usage
|
Usage
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
-- reset DateStyle to its default;
|
-- reset DateStyle to its default;
|
||||||
RESET DateStyle;
|
RESET DateStyle;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
-- reset Geqo to its default;
|
-- reset Geqo to its default;
|
||||||
RESET GEQO;
|
RESET GEQO;
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</REFSECT1>
|
</refsect1>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-RESET-3">
|
<refsect1 id="R1-SQL-RESET-3">
|
||||||
<TITLE>
|
<title>
|
||||||
Compatibility
|
Compatibility
|
||||||
</TITLE>
|
</title>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-RESET-4">
|
<refsect2 id="R2-SQL-RESET-4">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
SQL92
|
SQL92
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
There is no <command>RESET</command> in <acronym>SQL92</acronym>.
|
There is no <command>RESET</command> in <acronym>SQL92</acronym>.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</REFENTRY>
|
</refentry>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"../reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,384 +1,409 @@
|
|||||||
<REFENTRY ID="SQL-REVOKE">
|
<refentry id="SQL-REVOKE">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle>
|
||||||
REVOKE
|
REVOKE
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
REVOKE
|
REVOKE
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Revokes access privilege from a user, a group or all users.
|
Revokes access privilege from a user, a group or all users.
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
<REPLACEABLE CLASS="PARAMETER">
|
REVOKE <replaceable class="PARAMETER">privilege</replaceable> [, ...]
|
||||||
</REPLACEABLE>
|
ON <replaceable class="PARAMETER">object</replaceable> [, ...]
|
||||||
REVOKE <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...]
|
FROM { PUBLIC | GROUP <replaceable class="PARAMETER">ER">g</replaceable>BLE> | <replaceable class="PARAMETER">username</replaceable> }
|
||||||
ON <REPLACEABLE CLASS="PARAMETER">object</REPLACEABLE> [, ...]
|
</synopsis>
|
||||||
FROM { PUBLIC | GROUP <REPLACEABLE CLASS="PARAMETER">group</REPLACEABLE> | <REPLACEABLE CLASS="PARAMETER">username</REPLACEABLE> }
|
|
||||||
</SYNOPSIS>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-REVOKE-1">
|
<refsect2 id="R2-SQL-REVOKE-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
|
|
||||||
<VARIABLELIST>
|
|
||||||
<VARLISTENTRY>
|
|
||||||
<TERM>
|
|
||||||
<REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE>
|
|
||||||
</TERM>
|
|
||||||
<LISTITEM>
|
|
||||||
<PARA>
|
|
||||||
The possible privileges are:
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<variablelist>
|
||||||
<TERM>
|
<varlistentry>
|
||||||
SELECT
|
<term>
|
||||||
</TERM>
|
<replaceable class="PARAMETER">privilege</replaceable>
|
||||||
<LISTITEM>
|
</term>
|
||||||
<PARA>
|
<listitem>
|
||||||
Privilege to access all of the columns of a specific
|
<para>
|
||||||
table/view.
|
The possible privileges are:
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</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>
|
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-REVOKE-2">
|
<varlistentry>
|
||||||
<REFSECT2INFO>
|
<term>
|
||||||
<DATE>1998-09-24</DATE>
|
SELECT
|
||||||
</REFSECT2INFO>
|
</term>
|
||||||
<TITLE>
|
<listitem>
|
||||||
Outputs
|
<para>
|
||||||
</TITLE>
|
Privilege to access all of the columns of a specific
|
||||||
<PARA>
|
table/view.
|
||||||
|
</para>
|
||||||
<VARIABLELIST>
|
</listitem>
|
||||||
<VARLISTENTRY>
|
</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">
|
<varlistentry>
|
||||||
<REFSECT2INFO>
|
<term>
|
||||||
<DATE>1998-09-24</DATE>
|
INSERT
|
||||||
</REFSECT2INFO>
|
</term>
|
||||||
<TITLE>
|
<listitem>
|
||||||
Notes
|
<para>
|
||||||
</TITLE>
|
Privilege to insert data into all columns of a
|
||||||
<PARA>
|
specific table.
|
||||||
Refer to psql \z command for further information about permissions
|
</para>
|
||||||
on existing objects:
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<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>
|
<varlistentry>
|
||||||
</refsect1>
|
<term>
|
||||||
|
UPDATE
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Privilege to update all columns of a specific
|
||||||
|
table.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-REVOKE-2">
|
<varlistentry>
|
||||||
<TITLE>
|
<term>
|
||||||
Usage
|
DELETE
|
||||||
</TITLE>
|
</term>
|
||||||
<PARA>
|
<listitem>
|
||||||
<ProgramListing>
|
<para>
|
||||||
-- revoke insert privilege from all users on table films:
|
Privilege to delete rows from a specific table.
|
||||||
--
|
</para>
|
||||||
REVOKE INSERT ON films FROM PUBLIC;
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
-- 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>
|
||||||
<varlistentry>
|
<term>
|
||||||
<term>
|
RULE
|
||||||
<synopsis>
|
</term>
|
||||||
REVOKE { SELECT | DELETE | USAGE | ALL PRIVILEGES } [, ...]
|
<listitem>
|
||||||
ON <replaceable class="parameter">object</replaceable>
|
<para>
|
||||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
Privilege to define rules on table/view.
|
||||||
REVOKE { INSERT | UPDATE | REFERENCES } [, ...] [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
|
(See <command>CREATE RULE</command>).
|
||||||
ON <replaceable class="parameter">object</replaceable>
|
</para>
|
||||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
</listitem>
|
||||||
</synopsis>
|
</varlistentry>
|
||||||
</term>
|
|
||||||
<listitem>
|
<varlistentry>
|
||||||
<para>
|
<term>
|
||||||
Refer to the <command>GRANT</command> command for details on individual fields.
|
ALL
|
||||||
</para>
|
</term>
|
||||||
</listitem>
|
<listitem>
|
||||||
</varlistentry>
|
<para>
|
||||||
|
Rescind all privileges.
|
||||||
<varlistentry>
|
</para>
|
||||||
<term>
|
</listitem>
|
||||||
<synopsis>
|
</varlistentry>
|
||||||
REVOKE GRANT OPTION FOR <replaceable class="parameter">privilege</replaceable> [, ...]
|
|
||||||
ON <replaceable class="parameter">object</replaceable>
|
<varlistentry>
|
||||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE }
|
<term>
|
||||||
</synopsis>
|
<replaceable class="PARAMETER">object</replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Rescinds authority for a user to grant the specified privilege to others.
|
The name of an object from which to revoke access.
|
||||||
Refer to the <command>GRANT</command> command for details on individual fields.
|
The possible objects are:
|
||||||
</para>
|
<itemizedlist spacing="compact" mark="bullet">
|
||||||
</listitem>
|
<listitem>
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
The possible objects are:
|
table
|
||||||
<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>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
If user1 gives a privilege WITH GRANT OPTION to user2,
|
view
|
||||||
and user2 gives it to user3 then if user1 try revoke
|
|
||||||
this privilege it fails if he/she specify the RESTRICT
|
|
||||||
keyword.
|
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</listitem>
|
||||||
</refsect1>
|
|
||||||
</REFENTRY>
|
<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">
|
<refentry id="SQL-ROLLBACK">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle id="SQL-ROLLBACK-TITLE">
|
||||||
ROLLBACK
|
ROLLBACK
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
ROLLBACK
|
ROLLBACK
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Aborts the current transaction
|
Aborts the current transaction
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
ROLLBACK [ WORK ]
|
ROLLBACK [ WORK | TRANSACTION ]
|
||||||
</SYNOPSIS>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ROLLBACK-1">
|
<refsect2 id="R2-SQL-ROLLBACK-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<para>
|
||||||
None.
|
None.
|
||||||
</para>
|
</para>
|
||||||
</REFSECT2>
|
</refsect2>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-ROLLBACK-2">
|
<refsect2 id="R2-SQL-ROLLBACK-2">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Outputs
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<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-4">
|
<variablelist>
|
||||||
<REFSECT2INFO>
|
<varlistentry>
|
||||||
<DATE>1998-09-24</DATE>
|
<term>
|
||||||
</REFSECT2INFO>
|
ABORT
|
||||||
<TITLE>
|
</term>
|
||||||
SQL92
|
<listitem>
|
||||||
</TITLE>
|
<para>
|
||||||
<PARA>
|
Message returned if successful.
|
||||||
Full compatibility.
|
</para>
|
||||||
</para>
|
</listitem>
|
||||||
</refsect2>
|
</varlistentry>
|
||||||
</refsect1>
|
|
||||||
</REFENTRY>
|
<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>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
|
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> ]
|
[ 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> ]
|
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
|
||||||
[ GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...] ]
|
[ GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...] ]
|
||||||
[ HAVING <replaceable class="PARAMETER">condition</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 ] [, ...] ]
|
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||||
[ FOR UPDATE [OF class_name...]]
|
[ FOR UPDATE [OF class_name...]]
|
||||||
[ LIMIT count [OFFSET|, count]]
|
[ LIMIT count [OFFSET|, count]]
|
||||||
@ -66,17 +69,17 @@ SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<VARLISTENTRY>
|
<varlistentry>
|
||||||
<TERM>
|
<term>
|
||||||
TEMP
|
TEMP
|
||||||
</TERM>
|
</term>
|
||||||
<LISTITEM>
|
<listitem>
|
||||||
<PARA>
|
<para>
|
||||||
The table is created unique to this session, and is
|
The table is created unique to this session, and is
|
||||||
automatically dropped on session exit.
|
automatically dropped on session exit.
|
||||||
</PARA>
|
</para>
|
||||||
</LISTITEM>
|
</listitem>
|
||||||
</VARLISTENTRY>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
@ -215,7 +218,8 @@ SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
|
|||||||
<command>DISTINCT</command> will eliminate all duplicate rows from the
|
<command>DISTINCT</command> will eliminate all duplicate rows from the
|
||||||
selection.
|
selection.
|
||||||
<command>DISTINCT ON <replaceable class="PARAMETER">column</replaceable></command> will eliminate all duplicates in the specified column; this is
|
<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>
|
including duplicates.</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -269,7 +273,9 @@ including duplicates.</para>
|
|||||||
The optional WHERE condition has the general form:
|
The optional WHERE condition has the general form:
|
||||||
|
|
||||||
<synopsis>
|
<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>
|
</synopsis>
|
||||||
|
|
||||||
where <replaceable class="PARAMETER">cond_op</replaceable> can be
|
where <replaceable class="PARAMETER">cond_op</replaceable> can be
|
||||||
@ -381,7 +387,8 @@ SELECT name FROM distributors ORDER BY code;
|
|||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
<synopsis>
|
<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 ] [, ...] ]
|
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
@ -417,7 +424,8 @@ SELECT name FROM distributors ORDER BY code;
|
|||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
<synopsis>
|
<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 ] [, ...] ]
|
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
@ -448,7 +456,8 @@ SELECT name FROM distributors ORDER BY code;
|
|||||||
</title>
|
</title>
|
||||||
<para>
|
<para>
|
||||||
<synopsis>
|
<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 ] [, ...] ]
|
[ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
@ -485,25 +494,25 @@ SELECT f.title, f.did, d.name, f.date_prod, f.kind
|
|||||||
FROM distributors d, films f
|
FROM distributors d, films f
|
||||||
WHERE f.did = d.did
|
WHERE f.did = d.did
|
||||||
|
|
||||||
title |did|name | date_prod|kind
|
title |did|name | date_prod|kind
|
||||||
-------------------------+---+----------------+----------+----------
|
-------------------------+---+----------------+----------+----------
|
||||||
The Third Man |101|British Lion |1949-12-23|Drama
|
The Third Man |101|British Lion |1949-12-23|Drama
|
||||||
The African Queen |101|British Lion |1951-08-11|Romantic
|
The African Queen |101|British Lion |1951-08-11|Romantic
|
||||||
Une Femme est une Femme |102|Jean Luc Godard |1961-03-12|Romantic
|
Une Femme est une Femme |102|Jean Luc Godard |1961-03-12|Romantic
|
||||||
Vertigo |103|Paramount |1958-11-14|Action
|
Vertigo |103|Paramount |1958-11-14|Action
|
||||||
Becket |103|Paramount |1964-02-03|Drama
|
Becket |103|Paramount |1964-02-03|Drama
|
||||||
48 Hrs |103|Paramount |1982-10-22|Action
|
48 Hrs |103|Paramount |1982-10-22|Action
|
||||||
War and Peace |104|Mosfilm |1967-02-12|Drama
|
War and Peace |104|Mosfilm |1967-02-12|Drama
|
||||||
West Side Story |105|United Artists |1961-01-03|Musical
|
West Side Story |105|United Artists |1961-01-03|Musical
|
||||||
Bananas |105|United Artists |1971-07-13|Comedy
|
Bananas |105|United Artists |1971-07-13|Comedy
|
||||||
Yojimbo |106|Toho |1961-06-16|Drama
|
Yojimbo |106|Toho |1961-06-16|Drama
|
||||||
There's a Girl in my Soup|107|Columbia |1970-06-11|Comedy
|
There's a Girl in my Soup|107|Columbia |1970-06-11|Comedy
|
||||||
Taxi Driver |107|Columbia |1975-05-15|Action
|
Taxi Driver |107|Columbia |1975-05-15|Action
|
||||||
Absence of Malice |107|Columbia |1981-11-15|Action
|
Absence of Malice |107|Columbia |1981-11-15|Action
|
||||||
Storia di una donna |108|Westward |1970-08-15|Romantic
|
Storia di una donna |108|Westward |1970-08-15|Romantic
|
||||||
The King and I |109|20th Century Fox|1956-08-11|Musical
|
The King and I |109|20th Century Fox|1956-08-11|Musical
|
||||||
Das Boot |110|Bavaria Atelier |1981-11-11|Drama
|
Das Boot |110|Bavaria Atelier |1981-11-11|Drama
|
||||||
Bed Knobs and Broomsticks|111|Walt Disney | |Musical
|
Bed Knobs and Broomsticks|111|Walt Disney | |Musical
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
To sum the column <literal>len</literal> of all films and group
|
To sum the column <literal>len</literal> of all films and group
|
||||||
@ -587,14 +596,14 @@ SELECT actors.name
|
|||||||
FROM actors
|
FROM actors
|
||||||
WHERE actors.name LIKE 'W%'
|
WHERE actors.name LIKE 'W%'
|
||||||
|
|
||||||
name
|
name
|
||||||
--------------
|
--------------
|
||||||
Walt Disney
|
Walt Disney
|
||||||
Walter Matthau
|
Walter Matthau
|
||||||
Warner Bros.
|
Warner Bros.
|
||||||
Warren Beatty
|
Warren Beatty
|
||||||
Westward
|
Westward
|
||||||
Woody Allen
|
Woody Allen
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
@ -693,85 +702,10 @@ SELECT distributors.* WHERE name = 'Westwood';
|
|||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</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
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
sgml-omittag:t
|
sgml-omittag:
|
||||||
sgml-shorttag:t
|
sgml-shorttag:t
|
||||||
sgml-minimize-attributes:nil
|
sgml-minimize-attributes:nil
|
||||||
sgml-always-quote-attributes:t
|
sgml-always-quote-attributes:t
|
||||||
|
91
doc/src/sgml/ref/select_into.sgml
Normal file
91
doc/src/sgml/ref/select_into.sgml
Normal file
@ -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>
|
<date>1998-09-24</date>
|
||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SET <replaceable class="PARAMETER">variable</replaceable> { TO | = } { '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
|
SET <replaceable class="PARAMETER">variable</replaceable> { TO | = } {
|
||||||
|
'<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
|
||||||
SET TIME ZONE { '<replaceable class="PARAMETER">timezone</replaceable>' | LOCAL | DEFAULT };
|
SET TIME ZONE { '<replaceable class="PARAMETER">timezone</replaceable>' | LOCAL | DEFAULT };
|
||||||
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED }
|
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED }
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
@ -1,171 +1,189 @@
|
|||||||
<REFENTRY ID="SQL-SHOW">
|
<refentry id="SQL-SHOW">
|
||||||
<REFMETA>
|
<refmeta>
|
||||||
<REFENTRYTITLE>
|
<refentrytitle>
|
||||||
SHOW
|
SHOW
|
||||||
</REFENTRYTITLE>
|
</refentrytitle>
|
||||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</REFMETA>
|
</refmeta>
|
||||||
<REFNAMEDIV>
|
<refnamediv>
|
||||||
<REFNAME>
|
<refname>
|
||||||
SHOW
|
SHOW
|
||||||
</REFNAME>
|
</refname>
|
||||||
<REFPURPOSE>
|
<refpurpose>
|
||||||
Shows run-time parameters for session
|
Shows run-time parameters for session
|
||||||
</REFPURPOSE>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
<REFSYNOPSISDIV>
|
<refsynopsisdiv>
|
||||||
<REFSYNOPSISDIVINFO>
|
<refsynopsisdivinfo>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSYNOPSISDIVINFO>
|
</refsynopsisdivinfo>
|
||||||
<SYNOPSIS>
|
<synopsis>
|
||||||
SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE>
|
SHOW <replaceable class="PARAMETER">variable</replaceable>
|
||||||
</SYNOPSIS>
|
</synopsis>
|
||||||
|
|
||||||
<REFSECT2 ID="R2-SQL-SHOW-1">
|
<refsect2 id="R2-SQL-SHOW-1">
|
||||||
<REFSECT2INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT2INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Inputs
|
Inputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<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-2">
|
<variablelist>
|
||||||
<REFSECT2INFO>
|
<varlistentry>
|
||||||
<DATE>1998-09-24</DATE>
|
<term>
|
||||||
</REFSECT2INFO>
|
<replaceable class="PARAMETER">variable</replaceable>
|
||||||
<TITLE>
|
</term>
|
||||||
Outputs
|
<listitem>
|
||||||
</TITLE>
|
<para>
|
||||||
<PARA>
|
Refer to <command>SET</command> for more information on available
|
||||||
|
variables.
|
||||||
<VARIABLELIST>
|
</para>
|
||||||
<VARLISTENTRY>
|
</listitem>
|
||||||
<TERM>
|
</varlistentry>
|
||||||
<returnvalue>NOTICE: <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is <replaceable>value</replaceable></ReturnValue>
|
</variablelist>
|
||||||
SHOW VARIABLE
|
</para>
|
||||||
</TERM>
|
</refsect2>
|
||||||
<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-1">
|
<refsect2 id="R2-SQL-SHOW-2">
|
||||||
<REFSECT1INFO>
|
<refsect2info>
|
||||||
<DATE>1998-09-24</DATE>
|
<date>1998-09-24</date>
|
||||||
</REFSECT1INFO>
|
</refsect2info>
|
||||||
<TITLE>
|
<title>
|
||||||
Description
|
Outputs
|
||||||
</TITLE>
|
</title>
|
||||||
<PARA>
|
<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-3">
|
<variablelist>
|
||||||
<REFSECT2INFO>
|
<varlistentry>
|
||||||
<DATE>1998-09-24</DATE>
|
<term>
|
||||||
</REFSECT2INFO>
|
<returnvalue>NOTICE: <replaceable
|
||||||
<TITLE>
|
class="PARAMETER">">variab</replaceable>E> is <replaceable>value</replaceable></returnvalue>
|
||||||
Notes
|
SHOW VARIABLE
|
||||||
</TITLE>
|
</term>
|
||||||
<PARA>
|
<listitem>
|
||||||
The <command>SHOW</command> is a <productname>Postgres</productname>
|
<para>
|
||||||
language extension.
|
Message returned if successfully.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
</listitem>
|
||||||
Refer to <command>SET</command>/<command>RESET</command>
|
</varlistentry>
|
||||||
to set/reset variable values.
|
<varlistentry>
|
||||||
See also <command>SET TIME ZONE</command>.
|
<term>
|
||||||
</para>
|
<returnvalue>NOTICE: Unrecognized variable <replaceable>value</replaceable></returnvalue>
|
||||||
</REFSECT2>
|
</term>
|
||||||
</REFSECT1>
|
<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">
|
<refsect1 id="R1-SQL-SHOW-1">
|
||||||
<TITLE>
|
<refsect1info>
|
||||||
Usage
|
<date>1998-09-24</date>
|
||||||
</TITLE>
|
</refsect1info>
|
||||||
<PARA>
|
<title>
|
||||||
<ProgramListing>
|
Description
|
||||||
-- show DateStyle;
|
</title>
|
||||||
SHOW DateStyle;
|
<para>
|
||||||
NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
|
<command>SHOW</command> will display the current
|
||||||
|
configuration parameters for
|
||||||
-- show Geqo;
|
variable during a session.
|
||||||
SHOW GEQO;
|
</para>
|
||||||
NOTICE:GEQO is ON
|
<para>
|
||||||
</ProgramListing>
|
The session can be configured using <command>SET</command> statement,
|
||||||
</para>
|
and values
|
||||||
</REFSECT1>
|
can be restored to the defaults using <command>RESET</command> statement.
|
||||||
|
Parameters and values are case-insensitive.
|
||||||
|
</para>
|
||||||
|
|
||||||
<REFSECT1 ID="R1-SQL-SHOW-3">
|
<refsect2 id="R2-SQL-SHOW-3">
|
||||||
<TITLE>
|
<refsect2info>
|
||||||
Compatibility
|
<date>1998-09-24</date>
|
||||||
</TITLE>
|
</refsect2info>
|
||||||
<PARA>
|
<title>
|
||||||
</PARA>
|
Notes
|
||||||
|
</title>
|
||||||
<REFSECT2 ID="R2-SQL-SHOW-4">
|
<para>
|
||||||
<REFSECT2INFO>
|
The <command>SHOW</command> is a <productname>Postgres</productname>
|
||||||
<DATE>1998-09-24</DATE>
|
language extension.
|
||||||
</REFSECT2INFO>
|
</para>
|
||||||
<TITLE>
|
<para>
|
||||||
SQL92
|
Refer to <command>SET</command>/<command>RESET</command>
|
||||||
</TITLE>
|
to set/reset variable values.
|
||||||
<PARA>
|
See also <command>SET TIME ZONE</command>.
|
||||||
There is no <command>SET</command> defined in <acronym>SQL92</acronym>.
|
</para>
|
||||||
</para>
|
</refsect2>
|
||||||
</refsect2>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
</REFENTRY>
|
<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…
x
Reference in New Issue
Block a user