mirror of https://github.com/postgres/postgres
Split reference pages for CREATE TABLE AS and SELECT INTO to allow psgml (the emacs parser) to handle parsing.REL6_5_PATCHES
parent
5e84d58e70
commit
1ac838edba
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,117 @@ |
||||
<refentry id="CREATETABLEAS"> |
||||
<refmeta> |
||||
<refentrytitle> |
||||
CREATE TABLE AS |
||||
</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
<refnamediv> |
||||
<refname> |
||||
CREATE TABLE AS |
||||
</refname> |
||||
<refpurpose> |
||||
Creates a new table |
||||
</refpurpose> |
||||
</refnamediv> |
||||
<refsynopsisdiv> |
||||
<refsynopsisdivinfo> |
||||
<date>1998-09-22</date> |
||||
</refsynopsisdivinfo> |
||||
<synopsis> |
||||
CREATE TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceable> [, ...] ) ] |
||||
AS <replaceable>select_clause</replaceable> |
||||
</synopsis> |
||||
|
||||
<refsect2> |
||||
<refsect2info> |
||||
<date>1998-09-22</date> |
||||
</refsect2info> |
||||
<title> |
||||
Inputs |
||||
</title> |
||||
<para> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
<replaceable>table</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
The name of a new table to be created. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
<replaceable>column</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
The name of a column. Multiple column names can be specified using |
||||
a comma-delimited list of column names. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
<replaceable>select_clause</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
A valid query statement. Refer to SELECT for a description of the |
||||
allowed syntax. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
|
||||
<refsect2> |
||||
<refsect2info> |
||||
<date>1998-09-22</date> |
||||
</refsect2info> |
||||
<title> |
||||
Outputs |
||||
</title> |
||||
<para> |
||||
Refer to CREATE TABLE and SELECT for a summary of possible output |
||||
messages. |
||||
</para> |
||||
</refsect2> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<refsect1info> |
||||
<date>1998-09-22</date> |
||||
</refsect1info> |
||||
<title> |
||||
Description |
||||
</title> |
||||
<para> |
||||
CREATE TABLE AS enables a table to be created from the contents of |
||||
an existing table. It has functionality equivalent to SELECT TABLE INTO, |
||||
but with perhaps a more obvious syntax. |
||||
</para> |
||||
</refsect1> |
||||
</refentry> |
||||
|
||||
<!-- Keep this comment at the end of the file |
||||
Local variables: |
||||
mode: sgml |
||||
sgml-omittag:nil |
||||
sgml-shorttag:t |
||||
sgml-minimize-attributes:nil |
||||
sgml-always-quote-attributes:t |
||||
sgml-indent-step:1 |
||||
sgml-indent-data:t |
||||
sgml-parent-document:nil |
||||
sgml-default-dtd-file:"../reference.ced" |
||||
sgml-exposed-tags:nil |
||||
sgml-local-catalogs:"/usr/lib/sgml/catalog" |
||||
sgml-local-ecat-files:nil |
||||
End: |
||||
--> |
||||
File diff suppressed because it is too large
Load Diff
@ -1,142 +1,158 @@ |
||||
<REFENTRY ID="SQL-RESET"> |
||||
<REFMETA> |
||||
<REFENTRYTITLE> |
||||
RESET |
||||
</REFENTRYTITLE> |
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO> |
||||
</REFMETA> |
||||
<REFNAMEDIV> |
||||
<REFNAME> |
||||
RESET |
||||
</REFNAME> |
||||
<REFPURPOSE> |
||||
Restores run-time parameters for session to default values |
||||
</REFPURPOSE> |
||||
</refnamediv> |
||||
<REFSYNOPSISDIV> |
||||
<REFSYNOPSISDIVINFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSYNOPSISDIVINFO> |
||||
<SYNOPSIS> |
||||
RESET <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> |
||||
</SYNOPSIS> |
||||
<refentry id="SQL-RESET"> |
||||
<refmeta> |
||||
<refentrytitle> |
||||
RESET |
||||
</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
<refnamediv> |
||||
<refname> |
||||
RESET |
||||
</refname> |
||||
<refpurpose> |
||||
Restores run-time parameters for session to default values |
||||
</refpurpose> |
||||
</refnamediv> |
||||
<refsynopsisdiv> |
||||
<refsynopsisdivinfo> |
||||
<date>1998-09-24</date> |
||||
</refsynopsisdivinfo> |
||||
<synopsis> |
||||
RESET <replaceable class="PARAMETER">variable</replaceable> |
||||
</synopsis> |
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-1"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Inputs |
||||
</TITLE> |
||||
<PARA> |
||||
<VARIABLELIST> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Refer to the SET statement for more information on available |
||||
variables. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</REFSECT2> |
||||
<refsect2 id="R2-SQL-RESET-1"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Inputs |
||||
</title> |
||||
<para> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
<replaceable class="PARAMETER">variable</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Refer to the SET statement for more information on available |
||||
variables. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-2"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Outputs |
||||
</TITLE> |
||||
<PARA> |
||||
|
||||
<VARIABLELIST> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
RESET VARIABLE |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Message returned if |
||||
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is successfully reset |
||||
to its default value.. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</VARIABLELIST> |
||||
</para> |
||||
</REFSECT2> |
||||
</REFSYNOPSISDIV> |
||||
<refsect2 id="R2-SQL-RESET-2"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Outputs |
||||
</title> |
||||
<para> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
RESET VARIABLE |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Message returned if |
||||
<replaceable class="PARAMETER">variable</replaceable> is successfully reset |
||||
to its default value.. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
</refsynopsisdiv> |
||||
|
||||
<REFSECT1 ID="R1-SQL-RESET-1"> |
||||
<REFSECT1INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT1INFO> |
||||
<TITLE> |
||||
Description |
||||
</TITLE> |
||||
<PARA> |
||||
<command>RESET</command> restores variables to the |
||||
default values. |
||||
Refer to the <command>SET</command> command for details on |
||||
allowed values and defaults. |
||||
<command>RESET</command> is an alternate form for |
||||
<synopsis> |
||||
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command> |
||||
</synopsis> |
||||
</para> |
||||
<refsect1 id="R1-SQL-RESET-1"> |
||||
<refsect1info> |
||||
<date>1998-09-24</date> |
||||
</refsect1info> |
||||
<title> |
||||
Description |
||||
</title> |
||||
<para> |
||||
<command>RESET</command> restores variables to the |
||||
default values. |
||||
Refer to the <command>SET</command> command for details on |
||||
allowed values and defaults. |
||||
<command>RESET</command> is an alternate form for |
||||
<command>SET <replaceable class="parameter">variable</replaceable> = DEFAULT</command> |
||||
</para> |
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-3"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Notes |
||||
</TITLE> |
||||
<PARA> |
||||
The RESET statement is a <productname>Postgres</productname> language extension. |
||||
</para> |
||||
<para> |
||||
Refer to SET/SHOW statements to set/show variable values. |
||||
</para> |
||||
</REFSECT2> |
||||
</refsect1> |
||||
<refsect2 id="R2-SQL-RESET-3"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Notes |
||||
</title> |
||||
<para> |
||||
The RESET statement is a <productname>Postgres</productname> |
||||
language extension. |
||||
</para> |
||||
<para> |
||||
Refer to SET/SHOW statements to set/show variable values. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
|
||||
<REFSECT1 ID="R1-SQL-RESET-2"> |
||||
<TITLE> |
||||
Usage |
||||
</TITLE> |
||||
<PARA> |
||||
<ProgramListing> |
||||
-- reset DateStyle to its default; |
||||
RESET DateStyle; |
||||
</programlisting> |
||||
<programlisting> |
||||
-- reset Geqo to its default; |
||||
RESET GEQO; |
||||
</ProgramListing> |
||||
</para> |
||||
</REFSECT1> |
||||
<refsect1 id="R1-SQL-RESET-2"> |
||||
<title> |
||||
Usage |
||||
</title> |
||||
<para> |
||||
<programlisting> |
||||
-- reset DateStyle to its default; |
||||
RESET DateStyle; |
||||
</programlisting> |
||||
<programlisting> |
||||
-- reset Geqo to its default; |
||||
RESET GEQO; |
||||
</programlisting> |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1 id="R1-SQL-RESET-3"> |
||||
<title> |
||||
Compatibility |
||||
</title> |
||||
|
||||
<REFSECT1 ID="R1-SQL-RESET-3"> |
||||
<TITLE> |
||||
Compatibility |
||||
</TITLE> |
||||
<refsect2 id="R2-SQL-RESET-4"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
SQL92 |
||||
</title> |
||||
<para> |
||||
There is no <command>RESET</command> in <acronym>SQL92</acronym>. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</refentry> |
||||
|
||||
<REFSECT2 ID="R2-SQL-RESET-4"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
SQL92 |
||||
</TITLE> |
||||
<PARA> |
||||
There is no <command>RESET</command> in <acronym>SQL92</acronym>. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</REFENTRY> |
||||
<!-- Keep this comment at the end of the file |
||||
Local variables: |
||||
mode: sgml |
||||
sgml-omittag:nil |
||||
sgml-shorttag:t |
||||
sgml-minimize-attributes:nil |
||||
sgml-always-quote-attributes:t |
||||
sgml-indent-step:1 |
||||
sgml-indent-data:t |
||||
sgml-parent-document:nil |
||||
sgml-default-dtd-file:"../reference.ced" |
||||
sgml-exposed-tags:nil |
||||
sgml-local-catalogs:"/usr/lib/sgml/catalog" |
||||
sgml-local-ecat-files:nil |
||||
End: |
||||
--> |
||||
|
||||
@ -1,384 +1,409 @@ |
||||
<REFENTRY ID="SQL-REVOKE"> |
||||
<REFMETA> |
||||
<REFENTRYTITLE> |
||||
REVOKE |
||||
</REFENTRYTITLE> |
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO> |
||||
</REFMETA> |
||||
<REFNAMEDIV> |
||||
<REFNAME> |
||||
REVOKE |
||||
</REFNAME> |
||||
<REFPURPOSE> |
||||
Revokes access privilege from a user, a group or all users. |
||||
</REFPURPOSE> |
||||
</refnamediv> |
||||
<REFSYNOPSISDIV> |
||||
<REFSYNOPSISDIVINFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSYNOPSISDIVINFO> |
||||
<SYNOPSIS> |
||||
<REPLACEABLE CLASS="PARAMETER"> |
||||
</REPLACEABLE> |
||||
REVOKE <REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> [, ...] |
||||
ON <REPLACEABLE CLASS="PARAMETER">object</REPLACEABLE> [, ...] |
||||
FROM { PUBLIC | GROUP <REPLACEABLE CLASS="PARAMETER">group</REPLACEABLE> | <REPLACEABLE CLASS="PARAMETER">username</REPLACEABLE> } |
||||
</SYNOPSIS> |
||||
<refentry id="SQL-REVOKE"> |
||||
<refmeta> |
||||
<refentrytitle> |
||||
REVOKE |
||||
</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
<refnamediv> |
||||
<refname> |
||||
REVOKE |
||||
</refname> |
||||
<refpurpose> |
||||
Revokes access privilege from a user, a group or all users. |
||||
</refpurpose> |
||||
</refnamediv> |
||||
<refsynopsisdiv> |
||||
<refsynopsisdivinfo> |
||||
<date>1998-09-24</date> |
||||
</refsynopsisdivinfo> |
||||
<synopsis> |
||||
REVOKE <replaceable class="PARAMETER">privilege</replaceable> [, ...] |
||||
ON <replaceable class="PARAMETER">object</replaceable> [, ...] |
||||
FROM { PUBLIC | GROUP <replaceable class="PARAMETER">ER">g</replaceable>BLE> | <replaceable class="PARAMETER">username</replaceable> } |
||||
</synopsis> |
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-1"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Inputs |
||||
</TITLE> |
||||
<PARA> |
||||
|
||||
<VARIABLELIST> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<REPLACEABLE CLASS="PARAMETER">privilege</REPLACEABLE> |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
The possible privileges are: |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
<refsect2 id="R2-SQL-REVOKE-1"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Inputs |
||||
</title> |
||||
<para> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
SELECT |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Privilege to access all of the columns of a specific |
||||
table/view. |
||||
</PARA> |
||||
</LISTITEM> |
||||
</VARLISTENTRY> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
INSERT |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Privilege to insert data into all columns of a |
||||
specific table. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
UPDATE |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Privilege to update all columns of a specific |
||||
table. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
DELETE |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Privilege to delete rows from a specific table. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
RULE |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Privilege to define rules on table/view. |
||||
(See <command>CREATE RULE</command>). |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
ALL |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Rescind all privileges. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<REPLACEABLE CLASS="PARAMETER">object</REPLACEABLE> |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
The name of an object from which to revoke access. |
||||
The possible objects are: |
||||
<itemizedlist mark="bullet" spacing="compact"> |
||||
<listitem> |
||||
<para> |
||||
table |
||||
</para> |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para> |
||||
view |
||||
</para> |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para> |
||||
sequence |
||||
</para> |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para> |
||||
index |
||||
</para> |
||||
</listitem> |
||||
</itemizedlist> |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<REPLACEABLE CLASS="PARAMETER">group</REPLACEABLE> |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
The name of a group from whom to revoke privileges. |
||||
</PARA> |
||||
</LISTITEM> |
||||
</VARLISTENTRY> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<REPLACEABLE CLASS="PARAMETER">username</REPLACEABLE> |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
The name of a user from whom revoke privileges. Use the PUBLIC keyword |
||||
to specify all users. |
||||
</PARA> |
||||
</LISTITEM> |
||||
</VARLISTENTRY> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
PUBLIC |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Rescind the specified privilege(s) for all users. |
||||
</para> |
||||
</LISTITEM> |
||||
</VARLISTENTRY> |
||||
</VARIABLELIST> |
||||
</para> |
||||
</REFSECT2> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
<replaceable class="PARAMETER">privilege</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
The possible privileges are: |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-2"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Outputs |
||||
</TITLE> |
||||
<PARA> |
||||
|
||||
<VARIABLELIST> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
CHANGE |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Message returned if successfully. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
ERROR |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Message returned if object is not available or impossible |
||||
to revoke privileges from a group or users. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</VARIABLELIST> |
||||
</para> |
||||
</REFSECT2> |
||||
</REFSYNOPSISDIV> |
||||
|
||||
<REFSECT1 ID="R1-SQL-REVOKE-1"> |
||||
<REFSECT1INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT1INFO> |
||||
<TITLE> |
||||
Description |
||||
</TITLE> |
||||
<PARA> |
||||
REVOKE allows creator of an object to revoke permissions granted |
||||
before, from all users (via PUBLIC) or a certain user or group. |
||||
</para> |
||||
<varlistentry> |
||||
<term> |
||||
SELECT |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Privilege to access all of the columns of a specific |
||||
table/view. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-3"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Notes |
||||
</TITLE> |
||||
<PARA> |
||||
Refer to psql \z command for further information about permissions |
||||
on existing objects: |
||||
|
||||
<programlisting> |
||||
Database = lusitania |
||||
+------------------+---------------------------------------------+ |
||||
| Relation | Grant/Revoke Permissions | |
||||
+------------------+---------------------------------------------+ |
||||
| mytable | {"=rw","miriam=arwR","group todos=rw"} | |
||||
+------------------+---------------------------------------------+ |
||||
Legend: |
||||
uname=arwR -- privileges granted to a user |
||||
group gname=arwR -- privileges granted to a GROUP |
||||
=arwR -- privileges granted to PUBLIC |
||||
|
||||
r -- SELECT |
||||
w -- UPDATE/DELETE |
||||
a -- INSERT |
||||
R -- RULE |
||||
arwR -- ALL |
||||
</programlisting> |
||||
</para> |
||||
<tip> |
||||
<para> |
||||
Currently, to create a GROUP you have to insert |
||||
data manually into table pg_group as: |
||||
<programlisting> |
||||
INSERT INTO pg_group VALUES ('todos'); |
||||
CREATE USER miriam IN GROUP todos; |
||||
</programlisting> |
||||
</para> |
||||
</tip> |
||||
<varlistentry> |
||||
<term> |
||||
INSERT |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Privilege to insert data into all columns of a |
||||
specific table. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
</REFSECT2> |
||||
</refsect1> |
||||
<varlistentry> |
||||
<term> |
||||
UPDATE |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Privilege to update all columns of a specific |
||||
table. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<REFSECT1 ID="R1-SQL-REVOKE-2"> |
||||
<TITLE> |
||||
Usage |
||||
</TITLE> |
||||
<PARA> |
||||
<ProgramListing> |
||||
-- revoke insert privilege from all users on table films: |
||||
-- |
||||
REVOKE INSERT ON films FROM PUBLIC; |
||||
|
||||
-- revoke all privileges from user manuel on view kinds: |
||||
-- |
||||
REVOKE ALL ON kinds FROM manuel; |
||||
</ProgramListing> |
||||
</para> |
||||
</REFSECT1> |
||||
|
||||
<REFSECT1 ID="R1-SQL-REVOKE-3"> |
||||
<TITLE> |
||||
Compatibility |
||||
</TITLE> |
||||
|
||||
<REFSECT2 ID="R2-SQL-REVOKE-4"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-01</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
SQL92 |
||||
</TITLE> |
||||
<PARA> |
||||
The SQL92 syntax for <command>REVOKE</command> |
||||
has additional capabilities for rescinding |
||||
privileges, including those on individual columns in tables: |
||||
<varlistentry> |
||||
<term> |
||||
DELETE |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Privilege to delete rows from a specific table. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
<synopsis> |
||||
REVOKE { SELECT | DELETE | USAGE | ALL PRIVILEGES } [, ...] |
||||
ON <replaceable class="parameter">object</replaceable> |
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE } |
||||
REVOKE { INSERT | UPDATE | REFERENCES } [, ...] [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ] |
||||
ON <replaceable class="parameter">object</replaceable> |
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE } |
||||
</synopsis> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Refer to the <command>GRANT</command> command for details on individual fields. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
<synopsis> |
||||
REVOKE GRANT OPTION FOR <replaceable class="parameter">privilege</replaceable> [, ...] |
||||
ON <replaceable class="parameter">object</replaceable> |
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE } |
||||
</synopsis> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Rescinds authority for a user to grant the specified privilege to others. |
||||
Refer to the <command>GRANT</command> command for details on individual fields. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
RULE |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Privilege to define rules on table/view. |
||||
(See <command>CREATE RULE</command>). |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
ALL |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Rescind all privileges. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
<replaceable class="PARAMETER">object</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
The name of an object from which to revoke access. |
||||
The possible objects are: |
||||
<itemizedlist spacing="compact" mark="bullet"> |
||||
<listitem> |
||||
<para> |
||||
table |
||||
</para> |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para> |
||||
The possible objects are: |
||||
<simplelist> |
||||
<member> [ TABLE ] table/view |
||||
</member> |
||||
<member> CHARACTER SET character-set |
||||
</member> |
||||
<member> COLLATION collation |
||||
</member> |
||||
<member> TRANSLATION translation |
||||
</member> |
||||
<member> DOMAIN domain |
||||
</member> |
||||
</simplelist> |
||||
view |
||||
</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. |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para> |
||||
sequence |
||||
</para> |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para> |
||||
If user1 gives a privilege WITH GRANT OPTION to user2, |
||||
and user2 gives it to user3 then if user1 try revoke |
||||
this privilege it fails if he/she specify the RESTRICT |
||||
keyword. |
||||
index |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</REFENTRY> |
||||
</listitem> |
||||
</itemizedlist> |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
<replaceable class="PARAMETER">group</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
The name of a group from whom to revoke privileges. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
<replaceable class="PARAMETER">username</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
The name of a user from whom revoke privileges. Use the PUBLIC keyword |
||||
to specify all users. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
PUBLIC |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Rescind the specified privilege(s) for all users. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
|
||||
<refsect2 id="R2-SQL-REVOKE-2"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Outputs |
||||
</title> |
||||
<para> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
CHANGE |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Message returned if successfully. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
ERROR |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Message returned if object is not available or impossible |
||||
to revoke privileges from a group or users. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1 id="R1-SQL-REVOKE-1"> |
||||
<refsect1info> |
||||
<date>1998-09-24</date> |
||||
</refsect1info> |
||||
<title> |
||||
Description |
||||
</title> |
||||
<para> |
||||
REVOKE allows creator of an object to revoke permissions granted |
||||
before, from all users (via PUBLIC) or a certain user or group. |
||||
</para> |
||||
|
||||
<refsect2 id="R2-SQL-REVOKE-3"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Notes |
||||
</title> |
||||
<para> |
||||
Refer to psql \z command for further information about permissions |
||||
on existing objects: |
||||
|
||||
<programlisting> |
||||
Database = lusitania |
||||
+------------------+---------------------------------------------+ |
||||
| Relation | Grant/Revoke Permissions | |
||||
+------------------+---------------------------------------------+ |
||||
| mytable | {"=rw","miriam=arwR","group todos=rw"} | |
||||
+------------------+---------------------------------------------+ |
||||
Legend: |
||||
uname=arwR -- privileges granted to a user |
||||
group gname=arwR -- privileges granted to a GROUP |
||||
=arwR -- privileges granted to PUBLIC |
||||
|
||||
r -- SELECT |
||||
w -- UPDATE/DELETE |
||||
a -- INSERT |
||||
R -- RULE |
||||
arwR -- ALL |
||||
</programlisting> |
||||
</para> |
||||
<tip> |
||||
<para> |
||||
Currently, to create a GROUP you have to insert |
||||
data manually into table pg_group as: |
||||
<programlisting> |
||||
INSERT INTO pg_group VALUES ('todos'); |
||||
CREATE USER miriam IN GROUP todos; |
||||
</programlisting> |
||||
</para> |
||||
</tip> |
||||
|
||||
</refsect2> |
||||
</refsect1> |
||||
|
||||
<refsect1 id="R1-SQL-REVOKE-2"> |
||||
<title> |
||||
Usage |
||||
</title> |
||||
<para> |
||||
<programlisting> |
||||
-- revoke insert privilege from all users on table films: |
||||
-- |
||||
REVOKE INSERT ON films FROM PUBLIC; |
||||
</programlisting> |
||||
|
||||
<programlisting> |
||||
-- revoke all privileges from user manuel on view kinds: |
||||
-- |
||||
REVOKE ALL ON kinds FROM manuel; |
||||
</programlisting> |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1 id="R1-SQL-REVOKE-3"> |
||||
<title> |
||||
Compatibility |
||||
</title> |
||||
|
||||
<refsect2 id="R2-SQL-REVOKE-4"> |
||||
<refsect2info> |
||||
<date>1998-09-01</date> |
||||
</refsect2info> |
||||
<title> |
||||
SQL92 |
||||
</title> |
||||
<para> |
||||
The SQL92 syntax for <command>REVOKE</command> |
||||
has additional capabilities for rescinding |
||||
privileges, including those on individual columns in tables: |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
<synopsis> |
||||
REVOKE { SELECT | DELETE | USAGE | ALL PRIVILEGES } [, ...] |
||||
ON <replaceable class="parameter">object</replaceable> |
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE } |
||||
REVOKE { INSERT | UPDATE | REFERENCES } [, ...] [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ] |
||||
ON <replaceable class="parameter">object</replaceable> |
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE } |
||||
</synopsis> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Refer to <command>GRANT</command> for details on individual fields. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
<synopsis> |
||||
REVOKE GRANT OPTION FOR <replaceable class="parameter">privilege</replaceable> [, ...] |
||||
ON <replaceable class="parameter">object</replaceable> |
||||
FROM { PUBLIC | <replaceable class="parameter">username</replaceable> [, ...] } { RESTRICT | CASCADE } |
||||
</synopsis> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Rescinds authority for a user to grant the specified privilege |
||||
to others. |
||||
Refer to the <command>GRANT</command> command for details |
||||
on individual fields. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
<para> |
||||
The possible objects are: |
||||
<simplelist> |
||||
<member> |
||||
[ TABLE ] table/view |
||||
</member> |
||||
<member> |
||||
CHARACTER SET character-set |
||||
</member> |
||||
<member> |
||||
COLLATION collation |
||||
</member> |
||||
<member> |
||||
TRANSLATION translation |
||||
</member> |
||||
<member> |
||||
DOMAIN domain |
||||
</member> |
||||
</simplelist> |
||||
</para> |
||||
|
||||
<para> |
||||
If user1 gives a privilege WITH GRANT OPTION to user2, |
||||
and user2 gives it to user3 then user1 can revoke |
||||
this privilege in cascade using the CASCADE keyword. |
||||
</para> |
||||
<para> |
||||
If user1 gives a privilege WITH GRANT OPTION to user2, |
||||
and user2 gives it to user3 then if user1 try revoke |
||||
this privilege it fails if he/she specify the RESTRICT |
||||
keyword. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</refentry> |
||||
|
||||
<!-- Keep this comment at the end of the file |
||||
Local variables: |
||||
mode: sgml |
||||
sgml-omittag:nil |
||||
sgml-shorttag:t |
||||
sgml-minimize-attributes:nil |
||||
sgml-always-quote-attributes:t |
||||
sgml-indent-step:1 |
||||
sgml-indent-data:t |
||||
sgml-parent-document:nil |
||||
sgml-default-dtd-file:"../reference.ced" |
||||
sgml-exposed-tags:nil |
||||
sgml-local-catalogs:"/usr/lib/sgml/catalog" |
||||
sgml-local-ecat-files:nil |
||||
End: |
||||
--> |
||||
|
||||
@ -1,133 +1,154 @@ |
||||
<REFENTRY ID="SQL-ROLLBACK"> |
||||
<REFMETA> |
||||
<REFENTRYTITLE> |
||||
<refentry id="SQL-ROLLBACK"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-ROLLBACK-TITLE"> |
||||
ROLLBACK |
||||
</REFENTRYTITLE> |
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO> |
||||
</REFMETA> |
||||
<REFNAMEDIV> |
||||
<REFNAME> |
||||
</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
<refnamediv> |
||||
<refname> |
||||
ROLLBACK |
||||
</REFNAME> |
||||
<REFPURPOSE> |
||||
Aborts the current transaction |
||||
</REFPURPOSE> |
||||
</refnamediv> |
||||
<REFSYNOPSISDIV> |
||||
<REFSYNOPSISDIVINFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSYNOPSISDIVINFO> |
||||
<SYNOPSIS> |
||||
ROLLBACK [ WORK ] |
||||
</SYNOPSIS> |
||||
</refname> |
||||
<refpurpose> |
||||
Aborts the current transaction |
||||
</refpurpose> |
||||
</refnamediv> |
||||
<refsynopsisdiv> |
||||
<refsynopsisdivinfo> |
||||
<date>1998-09-24</date> |
||||
</refsynopsisdivinfo> |
||||
<synopsis> |
||||
ROLLBACK [ WORK | TRANSACTION ] |
||||
</synopsis> |
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-1"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Inputs |
||||
</TITLE> |
||||
<PARA> |
||||
None. |
||||
</para> |
||||
</REFSECT2> |
||||
<refsect2 id="R2-SQL-ROLLBACK-1"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Inputs |
||||
</title> |
||||
<para> |
||||
None. |
||||
</para> |
||||
</refsect2> |
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-2"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Outputs |
||||
</TITLE> |
||||
<PARA> |
||||
|
||||
<VARIABLELIST> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
ABORT |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Message returned if successful. |
||||
</para> |
||||
</listitem> |
||||
</VARLISTENTRY> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
NOTICE: UserAbortTransactionBlock and not in in-progress state |
||||
ABORT |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
If there is not any transaction currently in progress. |
||||
</para> |
||||
</listitem> |
||||
</VARLISTENTRY> |
||||
</VARIABLELIST> |
||||
</para> |
||||
</REFSECT2> |
||||
</REFSYNOPSISDIV> |
||||
<refsect2 id="R2-SQL-ROLLBACK-2"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Outputs |
||||
</title> |
||||
<para> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
ABORT |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Message returned if successful. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
NOTICE: UserAbortTransactionBlock and not in in-progress state |
||||
ABORT |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
If there is not any transaction currently in progress. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
</refsynopsisdiv> |
||||
|
||||
<REFSECT1 ID="R1-SQL-ROLLBACK-1"> |
||||
<REFSECT1INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT1INFO> |
||||
<TITLE> |
||||
Description |
||||
</TITLE> |
||||
<PARA> |
||||
<command>ROLLBACK</command> rolls back the current transaction and causes |
||||
all the updates made by the transaction to be discarded. |
||||
</para> |
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-3"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Notes |
||||
</TITLE> |
||||
<PARA> |
||||
The keyword WORK is noise and can be omitted. |
||||
</para> |
||||
<para> |
||||
Use the <command>COMMIT</command> statement to successfully |
||||
terminate a transaction. |
||||
</para> |
||||
</refsect2> |
||||
</REFSECT1> |
||||
<refsect1 id="R1-SQL-ROLLBACK-1"> |
||||
<refsect1info> |
||||
<date>1998-09-24</date> |
||||
</refsect1info> |
||||
<title> |
||||
Description |
||||
</title> |
||||
|
||||
<REFSECT1 ID="R1-SQL-ROLLBACK-2"> |
||||
<TITLE> |
||||
Usage |
||||
</TITLE> |
||||
<PARA> |
||||
<ProgramListing> |
||||
--To abort all changes: |
||||
-- |
||||
ROLLBACK WORK; |
||||
</ProgramListing> |
||||
</para> |
||||
</REFSECT1> |
||||
|
||||
<REFSECT1 ID="R1-SQL-ROLLBACK-3"> |
||||
<TITLE> |
||||
Compatibility |
||||
</TITLE> |
||||
<PARA> |
||||
</PARA> |
||||
|
||||
<REFSECT2 ID="R2-SQL-ROLLBACK-4"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
SQL92 |
||||
</TITLE> |
||||
<PARA> |
||||
Full compatibility. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</REFENTRY> |
||||
<para> |
||||
<command>ROLLBACK</command> rolls back the current transaction and causes |
||||
all the updates made by the transaction to be discarded. |
||||
</para> |
||||
|
||||
<refsect2 id="R2-SQL-ROLLBACK-3"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Notes |
||||
</title> |
||||
<para> |
||||
The keywords WORK and TRANSACTION are noise and can be omitted. |
||||
</para> |
||||
|
||||
<para> |
||||
Use <xref linkend="SQL-COMMIT-TITLE" endterm="SQL-COMMIT-TITLE"> |
||||
to successfully terminate a transaction. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
|
||||
<refsect1 id="R1-SQL-ROLLBACK-2"> |
||||
<title> |
||||
Usage |
||||
</title> |
||||
<para> |
||||
<programlisting> |
||||
--To abort all changes: |
||||
-- |
||||
ROLLBACK WORK; |
||||
</programlisting> |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1 id="R1-SQL-ROLLBACK-3"> |
||||
<title> |
||||
Compatibility |
||||
</title> |
||||
<para> |
||||
</para> |
||||
|
||||
<refsect2 id="R2-SQL-ROLLBACK-4"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
SQL92 |
||||
</title> |
||||
<para> |
||||
Full compatibility. TRANSACTION is a |
||||
<productname>Postgres</productname> extension. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</refentry> |
||||
|
||||
<!-- Keep this comment at the end of the file |
||||
Local variables: |
||||
mode: sgml |
||||
sgml-omittag:nil |
||||
sgml-shorttag:t |
||||
sgml-minimize-attributes:nil |
||||
sgml-always-quote-attributes:t |
||||
sgml-indent-step:1 |
||||
sgml-indent-data:t |
||||
sgml-parent-document:nil |
||||
sgml-default-dtd-file:"../reference.ced" |
||||
sgml-exposed-tags:nil |
||||
sgml-local-catalogs:"/usr/lib/sgml/catalog" |
||||
sgml-local-ecat-files:nil |
||||
End: |
||||
--> |
||||
|
||||
@ -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: |
||||
--> |
||||
@ -1,171 +1,189 @@ |
||||
<REFENTRY ID="SQL-SHOW"> |
||||
<REFMETA> |
||||
<REFENTRYTITLE> |
||||
SHOW |
||||
</REFENTRYTITLE> |
||||
<REFMISCINFO>SQL - Language Statements</REFMISCINFO> |
||||
</REFMETA> |
||||
<REFNAMEDIV> |
||||
<REFNAME> |
||||
SHOW |
||||
</REFNAME> |
||||
<REFPURPOSE> |
||||
Shows run-time parameters for session |
||||
</REFPURPOSE> |
||||
</refnamediv> |
||||
<REFSYNOPSISDIV> |
||||
<REFSYNOPSISDIVINFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSYNOPSISDIVINFO> |
||||
<SYNOPSIS> |
||||
SHOW <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> |
||||
</SYNOPSIS> |
||||
<refentry id="SQL-SHOW"> |
||||
<refmeta> |
||||
<refentrytitle> |
||||
SHOW |
||||
</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
<refnamediv> |
||||
<refname> |
||||
SHOW |
||||
</refname> |
||||
<refpurpose> |
||||
Shows run-time parameters for session |
||||
</refpurpose> |
||||
</refnamediv> |
||||
<refsynopsisdiv> |
||||
<refsynopsisdivinfo> |
||||
<date>1998-09-24</date> |
||||
</refsynopsisdivinfo> |
||||
<synopsis> |
||||
SHOW <replaceable class="PARAMETER">variable</replaceable> |
||||
</synopsis> |
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-1"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Inputs |
||||
</TITLE> |
||||
<PARA> |
||||
|
||||
<VARIABLELIST> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Refer to <command>SET</command> for more information on available |
||||
variables. |
||||
</para> |
||||
</listitem> |
||||
</VARLISTENTRY> |
||||
</VARIABLELIST> |
||||
</para> |
||||
</REFSECT2> |
||||
<refsect2 id="R2-SQL-SHOW-1"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Inputs |
||||
</title> |
||||
<para> |
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-2"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Outputs |
||||
</TITLE> |
||||
<PARA> |
||||
|
||||
<VARIABLELIST> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<returnvalue>NOTICE: <REPLACEABLE CLASS="PARAMETER">variable</REPLACEABLE> is <replaceable>value</replaceable></ReturnValue> |
||||
SHOW VARIABLE |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Message returned if successfully. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
<returnvalue>NOTICE: Unrecognized variable <replaceable>value</replaceable></ReturnValue> |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
Message returned if <ReturnValue>value</ReturnValue> does not exist. |
||||
</PARA> |
||||
</LISTITEM> |
||||
</VARLISTENTRY> |
||||
|
||||
<VARLISTENTRY> |
||||
<TERM> |
||||
NOTICE: Time zone is unknown |
||||
SHOW VARIABLE |
||||
</TERM> |
||||
<LISTITEM> |
||||
<PARA> |
||||
If the TZ environment variable is not set. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</VARIABLELIST> |
||||
</para> |
||||
</REFSECT2> |
||||
</REFSYNOPSISDIV> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
<replaceable class="PARAMETER">variable</replaceable> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Refer to <command>SET</command> for more information on available |
||||
variables. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
|
||||
<REFSECT1 ID="R1-SQL-SHOW-1"> |
||||
<REFSECT1INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT1INFO> |
||||
<TITLE> |
||||
Description |
||||
</TITLE> |
||||
<PARA> |
||||
<command>SHOW</command> will display the current |
||||
configuration parameters for |
||||
variable during a session. |
||||
</para> |
||||
<para> |
||||
The session can be configured using <command>SET</command> statement, |
||||
and values |
||||
can be restored to the defaults using <command>RESET</command> statement. |
||||
Parameters and values are case-insensitive. |
||||
</para> |
||||
<refsect2 id="R2-SQL-SHOW-2"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Outputs |
||||
</title> |
||||
<para> |
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-3"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
Notes |
||||
</TITLE> |
||||
<PARA> |
||||
The <command>SHOW</command> is a <productname>Postgres</productname> |
||||
language extension. |
||||
</para> |
||||
<para> |
||||
Refer to <command>SET</command>/<command>RESET</command> |
||||
to set/reset variable values. |
||||
See also <command>SET TIME ZONE</command>. |
||||
</para> |
||||
</REFSECT2> |
||||
</REFSECT1> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term> |
||||
<returnvalue>NOTICE: <replaceable |
||||
class="PARAMETER">">variab</replaceable>E> is <replaceable>value</replaceable></returnvalue> |
||||
SHOW VARIABLE |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Message returned if successfully. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
<varlistentry> |
||||
<term> |
||||
<returnvalue>NOTICE: Unrecognized variable <replaceable>value</replaceable></returnvalue> |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
Message returned if <returnvalue>value</returnvalue> does not exist. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term> |
||||
NOTICE: Time zone is unknown |
||||
SHOW VARIABLE |
||||
</term> |
||||
<listitem> |
||||
<para> |
||||
If the TZ environment variable is not set. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</para> |
||||
</refsect2> |
||||
</refsynopsisdiv> |
||||
|
||||
<REFSECT1 ID="R1-SQL-SHOW-2"> |
||||
<TITLE> |
||||
Usage |
||||
</TITLE> |
||||
<PARA> |
||||
<ProgramListing> |
||||
-- show DateStyle; |
||||
SHOW DateStyle; |
||||
NOTICE:DateStyle is Postgres with US (NonEuropean) conventions |
||||
|
||||
-- show Geqo; |
||||
SHOW GEQO; |
||||
NOTICE:GEQO is ON |
||||
</ProgramListing> |
||||
</para> |
||||
</REFSECT1> |
||||
<refsect1 id="R1-SQL-SHOW-1"> |
||||
<refsect1info> |
||||
<date>1998-09-24</date> |
||||
</refsect1info> |
||||
<title> |
||||
Description |
||||
</title> |
||||
<para> |
||||
<command>SHOW</command> will display the current |
||||
configuration parameters for |
||||
variable during a session. |
||||
</para> |
||||
<para> |
||||
The session can be configured using <command>SET</command> statement, |
||||
and values |
||||
can be restored to the defaults using <command>RESET</command> statement. |
||||
Parameters and values are case-insensitive. |
||||
</para> |
||||
|
||||
<REFSECT1 ID="R1-SQL-SHOW-3"> |
||||
<TITLE> |
||||
Compatibility |
||||
</TITLE> |
||||
<PARA> |
||||
</PARA> |
||||
|
||||
<REFSECT2 ID="R2-SQL-SHOW-4"> |
||||
<REFSECT2INFO> |
||||
<DATE>1998-09-24</DATE> |
||||
</REFSECT2INFO> |
||||
<TITLE> |
||||
SQL92 |
||||
</TITLE> |
||||
<PARA> |
||||
There is no <command>SET</command> defined in <acronym>SQL92</acronym>. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</REFENTRY> |
||||
<refsect2 id="R2-SQL-SHOW-3"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
Notes |
||||
</title> |
||||
<para> |
||||
The <command>SHOW</command> is a <productname>Postgres</productname> |
||||
language extension. |
||||
</para> |
||||
<para> |
||||
Refer to <command>SET</command>/<command>RESET</command> |
||||
to set/reset variable values. |
||||
See also <command>SET TIME ZONE</command>. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
|
||||
<refsect1 id="R1-SQL-SHOW-2"> |
||||
<title> |
||||
Usage |
||||
</title> |
||||
<para> |
||||
<programlisting> |
||||
-- show DateStyle; |
||||
SHOW DateStyle; |
||||
NOTICE:DateStyle is Postgres with US (NonEuropean) conventions |
||||
|
||||
-- show Geqo; |
||||
SHOW GEQO; |
||||
NOTICE:GEQO is ON |
||||
</programlisting> |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1 id="R1-SQL-SHOW-3"> |
||||
<title> |
||||
Compatibility |
||||
</title> |
||||
<para> |
||||
</para> |
||||
|
||||
<refsect2 id="R2-SQL-SHOW-4"> |
||||
<refsect2info> |
||||
<date>1998-09-24</date> |
||||
</refsect2info> |
||||
<title> |
||||
SQL92 |
||||
</title> |
||||
<para> |
||||
There is no <command>SHOW</command> defined in <acronym>SQL92</acronym>. |
||||
</para> |
||||
</refsect2> |
||||
</refsect1> |
||||
</refentry> |
||||
|
||||
<!-- Keep this comment at the end of the file |
||||
Local variables: |
||||
mode: sgml |
||||
sgml-omittag:nil |
||||
sgml-shorttag:t |
||||
sgml-minimize-attributes:nil |
||||
sgml-always-quote-attributes:t |
||||
sgml-indent-step:1 |
||||
sgml-indent-data:t |
||||
sgml-parent-document:nil |
||||
sgml-default-dtd-file:"../reference.ced" |
||||
sgml-exposed-tags:nil |
||||
sgml-local-catalogs:"/usr/lib/sgml/CATALOG" |
||||
sgml-local-ecat-files:nil |
||||
End: |
||||
--> |
||||
|
||||
Loading…
Reference in new issue