From: Thomas G. Lockhart Date: Fri, 25 Sep 1998 13:42:46 +0000 (+0000) Subject: Cleanup markup and minor editing to prepare for first release. X-Git-Tag: REL6_4_2~386 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8b6b5f14fcd480d5c45eb77bd6e29b11098d860;p=postgresql Cleanup markup and minor editing to prepare for first release. --- diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index c462c1eadc..0081f66726 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1663,6 +1663,102 @@ affect a column or a table. + + + + + CREATE TABLE + + SQL - Language Statements + + + + CREATE TABLE + + + Creates a new table + + + + + 1998-09-22 + + +CREATE TABLE table [ ( column [, ...] ) ] AS select_clause + + + + + 1998-09-22 + + + Inputs + + + + + + + table + + + + The name of a new table to be created. + + + + + + + column + + + + The name of a column. Multiple column names can be specified using +a comma-delimited list of column names. + + + + + + + select_clause + + + +A valid query statement. Refer to SELECT for a description of the +allowed syntax. + + + + + + + + 1998-09-22 + + + Outputs + + + Refer to CREATE TABLE and SELECT for a summary of possible output +messages. + + + + 1998-09-22 + + + Description + + +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. + + + + + diff --git a/doc/src/sgml/ref/revoke.sgml b/doc/src/sgml/ref/revoke.sgml index 6265175497..fcedc85d31 100644 --- a/doc/src/sgml/ref/revoke.sgml +++ b/doc/src/sgml/ref/revoke.sgml @@ -15,7 +15,7 @@ Revokes access privilege from a user, a group or all users. -1998-09-01 +1998-09-24 @@ -27,13 +27,13 @@ REVOKE privilege [, ...] -1998-09-01 +1998-09-24 Inputs - + @@ -89,7 +89,7 @@ RULE Privilege to define rules on table/view. -(See the CREATE RULE statement). +(See CREATE RULE). @@ -159,13 +159,20 @@ Rescind the specified privilege(s) for all users. -1998-04-15 +1998-09-24 Outputs - + + + + +status + + + @@ -186,13 +193,14 @@ ERROR to revoke privileges from a group or users. + -1998-09-01 +1998-09-24 Description @@ -203,7 +211,7 @@ Description <REFSECT2 ID="R2-SQL-REVOKE-3"> <REFSECT2INFO> -<DATE>1998-04-15</DATE> +<DATE>1998-09-24</DATE> </REFSECT2INFO> <TITLE> Notes @@ -249,13 +257,13 @@ Usage - -- revoke insert privilege from all users on table films: - -- - REVOKE INSERT ON films FROM PUBLIC; +-- 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; +-- revoke all privileges from user manuel on view kinds: +-- +REVOKE ALL ON kinds FROM manuel; @@ -265,7 +273,6 @@ Usage Compatibility - @@ -275,7 +282,8 @@ Compatibility SQL92 - The SQL92 syntax for REVOKE has additional capabilities for rescinding + The SQL92 syntax for REVOKE + has additional capabilities for rescinding privileges, including those on individual columns in tables: @@ -328,23 +336,3 @@ If user1 gives a privilege WITH GRANT OPTION to user2, this privilege it fails if he/she specify the RESTRICT keyword. - - diff --git a/doc/src/sgml/ref/rollback.sgml b/doc/src/sgml/ref/rollback.sgml index 7554cbe6c6..846a53837a 100644 --- a/doc/src/sgml/ref/rollback.sgml +++ b/doc/src/sgml/ref/rollback.sgml @@ -14,7 +14,7 @@ Aborts the current transaction -1998-09-01 +1998-09-24 ROLLBACK [ WORK ] @@ -22,7 +22,7 @@ ROLLBACK [ WORK ] -1998-09-01 +1998-09-24 Inputs @@ -34,7 +34,7 @@ None. <REFSECT2 ID="R2-SQL-ROLLBACK-2"> <REFSECT2INFO> -<DATE>1998-04-15</DATE> +<DATE>1998-09-24</DATE> </REFSECT2INFO> <TITLE> Outputs @@ -67,18 +67,18 @@ ABORT <REFSECT1 ID="R1-SQL-ROLLBACK-1"> <REFSECT1INFO> -<DATE>1998-04-15</DATE> +<DATE>1998-09-24</DATE> </REFSECT1INFO> <TITLE> Description - ROLLBACK rolls back the current transaction and causes + ROLLBACK rolls back the current transaction and causes all the updates made by the transaction to be discarded. -1998-04-15 +1998-09-24 Notes @@ -87,7 +87,8 @@ Notes The keyword WORK is noise and can be omitted. <para> -Use the COMMIT statement to successfully terminate a transaction. +Use the <command>COMMIT</command> statement to successfully + terminate a transaction. </REFSECT1> @@ -97,9 +98,9 @@ Usage - --To abort all changes: - -- - ROLLBACK WORK; +--To abort all changes: +-- +ROLLBACK WORK; @@ -113,7 +114,7 @@ Compatibility -1998-04-15 +1998-09-24 SQL92 @@ -121,23 +122,3 @@ SQL92 <PARA> Full compatibility. </REFENTRY> - -<!-- -<REPLACEABLE CLASS="PARAMETER"> -</REPLACEABLE> -<ReturnValue></ReturnValue> -<PARA> -</PARA> -<VARIABLELIST> -<VARLISTENTRY> -<TERM>• -</TERM> -<LISTITEM> -<PARA> -</PARA> -</LISTITEM> -</VARLISTENTRY> -</VARIABLELIST> -<PARA> -</PARA> ---> diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index ef47fa7d09..48de2d3abd 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -14,23 +14,23 @@ </refpurpose></refnamediv> <refsynopsisdiv> <refsynopsisdivinfo> - <date>1998-09-06</date> + <date>1998-09-24</date> </refsynopsisdivinfo> <synopsis> SELECT [ALL|DISTINCT] - <replaceable class="PARAMETER">expression</replaceable> [AS <replaceable class="PARAMETER">name</replaceable>] [, ...] - [INTO [TABLE] <replaceable class="PARAMETER">intable</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] <replaceable class="PARAMETER">select</replaceable>] - [ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ...] ] + <replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">name</replaceable> ] [, ...] + [ INTO [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] <replaceable class="PARAMETER">select</replaceable> ] + [ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ ASC | DESC ] [, ...] ] </synopsis> <refsect2 id="R2-SQL-SELECT-1"> <refsect2info> - <date>1998-09-06</date> + <date>1998-09-24</date> </refsect2info> <title> Inputs @@ -66,16 +66,16 @@ SELECT [ALL|DISTINCT] <varlistentry> <term> - <replaceable class="PARAMETER">intable</replaceable> + <replaceable class="PARAMETER">new_table</replaceable> </term> <listitem> <para> If the INTO TABLE clause is specified, the result of the query will be stored in another table with the indicated name. - If <replaceable class="PARAMETER">intable</replaceable> does + If <replaceable class="PARAMETER">new_table</replaceable> does not exist, it will be created automatically. - + Refer to <command>SELECT INTO</command> for more information. <note> <para> The <command>CREATE TABLE AS</command> statement will also @@ -151,11 +151,13 @@ SELECT [ALL|DISTINCT] <refsect2 id="R2-SQL-SELECT-2"> <refsect2info> - <date>1998-09-06</date> + <date>1998-09-24</date> </refsect2info> <title> Outputs + + @@ -170,7 +172,15 @@ SELECT [ALL|DISTINCT] - count + status + + + + + + + + count @@ -179,19 +189,21 @@ SELECT [ALL|DISTINCT] + - 1998-09-06 + 1998-09-24 Description - SELECT will get all rows which satisfy the WHERE condition + SELECT will get all rows which satisfy the + WHERE condition or all rows of a table if WHERE is omitted. @@ -214,20 +226,21 @@ SELECT [ALL|DISTINCT] You must have SELECT privilege to a table to read its values - (See GRANT/REVOKE statements). + (See GRANT/REVOKE statements). + - 1998-09-06 + 1998-09-24 - WHERE clause + WHERE Clause The optional WHERE condition has the general form: -WHERE expr cond_op expr [log_op ...] +WHERE expr cond_op expr [ log_op ... ] where cond_op can be @@ -243,24 +256,24 @@ WHERE expr - 1998-09-06 + 1998-09-24 - GROUP BY clause + GROUP BY Clause GROUP BY specifies a grouped table derived by the application of the this clause: - GROUP BY column [, ...] +GROUP BY column [, ...] - 1998-09-06 + 1998-09-24 - HAVING clause + HAVING Clause The optional HAVING condition has the general form: @@ -278,21 +291,22 @@ HAVING cond_expr that do not meet the cond_expr. - Each column referenced in cond_expr shall unambiguously + Each column referenced in +cond_expr shall unambiguously reference a grouping column. - 1998-09-06 + 1998-09-24 - ORDER BY clause + ORDER BY Clause -ORDER BY column [ASC | DESC] [, ...] +ORDER BY column [ ASC | DESC ] [, ...] @@ -302,17 +316,18 @@ ORDER BY column [ASC | DESC] [, ... The ordinal numbers refers to the ordinal (left-to-right) position of the column. This feature makes it possible to define an ordering on the basis of a column that does not have a proper name. - This is never absolutely necessary because it is always possible assign a name + This is never absolutely necessary because it is always possible + assign a name to a calculated column using the AS clause, e.g.: - SELECT title, date_prod + 1 AS newlen FROM films ORDER BY newlen; +SELECT title, date_prod + 1 AS newlen FROM films ORDER BY newlen; The columns in the ORDER BY must appear in the SELECT clause. Thus the following statement is illegal: - SELECT name FROM distributors ORDER BY code; +SELECT name FROM distributors ORDER BY code; @@ -323,15 +338,15 @@ ORDER BY column [ASC | DESC] [, ... - 1998-09-06 + 1998-09-24 - UNION clause + UNION Clause -table_query UNION [ALL] table_query - [ORDER BY column [ASC | DESC] [, ...] ] +table_query UNION [ ALL ] table_query + [ ORDER BY column [ ASC | DESC ] [, ...] ] where @@ -349,9 +364,10 @@ ORDER BY column [ASC | DESC] [, ... unless the ALL clause is specified. - Multiple UNION operators in the same SELECT statement are evaluated left to right. - Note that the ALL keyword is not global in nature, being applied only for the current pair of - table results. + Multiple UNION operators in the same SELECT statement are +evaluated left to right. + Note that the ALL keyword is not global in nature, being +applied only for the current pair of table results. @@ -364,9 +380,9 @@ ORDER BY column [ASC | DESC] [, ... distributors: - SELECT f.title, f.did, d.name, f.date_prod, f.kind - FROM distributors d, films f - WHERE f.did = d.did +SELECT f.title, f.did, d.name, f.date_prod, f.kind + FROM distributors d, films f + WHERE f.did = d.did title |did|name | date_prod|kind -------------------------+---+----------------+----------+---------- @@ -393,7 +409,7 @@ ORDER BY column [ASC | DESC] [, ... the reults by kind: - SELECT kind, SUM(len) AS total FROM films GROUP BY kind; +SELECT kind, SUM(len) AS total FROM films GROUP BY kind; kind |total ----------+------ @@ -410,10 +426,10 @@ ORDER BY column [ASC | DESC] [, ... that are less than 5 hours: - SELECT kind, SUM(len) AS total - FROM films - GROUP BY kind - HAVING SUM(len) < INTERVAL '5 hour'; +SELECT kind, SUM(len) AS total + FROM films + GROUP BY kind + HAVING SUM(len) < INTERVAL '5 hour'; kind |total ----------+------ @@ -426,8 +442,8 @@ ORDER BY column [ASC | DESC] [, ... (name): - SELECT * FROM distributors ORDER BY name; - SELECT * FROM distributors ORDER BY 2; +SELECT * FROM distributors ORDER BY name; +SELECT * FROM distributors ORDER BY 2; did|name ---+---------------- @@ -462,13 +478,13 @@ ORDER BY column [ASC | DESC] [, ... -- 112|Warner Bros. 3|Walter Matthau -- ... ... - SELECT distributors.name +SELECT distributors.name FROM distributors WHERE distributors.name LIKE 'W%' - UNION - SELECT actors.name - FROM actors - WHERE actors.name LIKE 'W%' +UNION +SELECT actors.name + FROM actors + WHERE actors.name LIKE 'W%' name -------------- @@ -491,7 +507,7 @@ ORDER BY column [ASC | DESC] [, ... - 1998-09-06 + 1998-09-24 <acronym>SQL92</acronym> @@ -504,7 +520,7 @@ ORDER BY <replaceable class="PARAMETER">column</replaceable> [ASC | DESC] [, ... <date>1998-04-15</date> </refsect3info> <title> - SELECT clause + SELECT Clause In the SQL92 standard, the optional keyword "AS" @@ -526,10 +542,10 @@ ORDER BY column [ASC | DESC] [, ... - 1998-09-06 + 1998-09-24 - UNION clause + UNION Clause The SQL92 syntax for UNION allows an @@ -550,6 +566,73 @@ ORDER BY column [ASC | DESC] [, ... + + + + SELECT + + SQL - Language Statements + + + + SELECT INTO + + + Create a new table from an existing table or view + + + + 1998-09-22 + + +SELECT [ ALL | DISTINCT ] expression [ AS name ] [, ...] + INTO [ TABLE ] new_table ] + [ FROM table [alias] [, ...] ] + [ WHERE condition ] + [ GROUP BY column [, ...] ] + [ HAVING condition [, ...] ] + [ UNION [ ALL ] select] + [ ORDER BY column [ ASC | DESC ] [, ...] ] + + + + + 1998-09-22 + + + Inputs + + +All input fields are described in detail for SELECT. + + + + 1998-09-22 + + + Outputs + + +All output fields are described in detail for SELECT. + + + + 1998-09-22 + + + Description + + +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. + + +CREATE TABLE AS is functionally equivalent to the SELECT INTO command. + + + + + diff --git a/doc/src/sgml/ref/show.sgml b/doc/src/sgml/ref/show.sgml index 73d60fc7c0..4bbc18e9d5 100644 --- a/doc/src/sgml/ref/show.sgml +++ b/doc/src/sgml/ref/show.sgml @@ -14,7 +14,7 @@ Shows run-time parameters for session -1998-08-31 +1998-09-24 SHOW variable @@ -22,13 +22,13 @@ SHOW variable -1998-08-31 +1998-09-24 Inputs - + @@ -36,7 +36,7 @@ Inputs - Refer to the SET statement for more information on available + Refer to SET for more information on available variables. @@ -45,70 +45,92 @@ Inputs -1998-08-31 +1998-09-24 Outputs - + + + + +status + + + + -NOTICE: variable is value +NOTICE: variable is value SHOW VARIABLE Message returned if successfully. + -NOTICE: Unrecognized variable value +NOTICE: Unrecognized variable value + Message returned if value does not exist. + + + +NOTICE: Time zone is unknown +SHOW VARIABLE + + + + If the TZ environment variable is not set. + + + -1998-08-31 +1998-09-24 Description - SHOW will display the current configuration parameters for + SHOW will display the current + configuration parameters for variable during a session. - The session can be configured using SET statement, and values - can be restored to the defaults using RESET statement. + The session can be configured using SET statement, + and values + can be restored to the defaults using RESET statement. Parameters and values are case-insensitive. -1998-08-31 +1998-09-24 Notes - The SHOW statement is a Postgres + The SHOW is a Postgres language extension. - Refer to the SET/RESET statements to set/reset variable values. - See also the SET TIME ZONE statement. + Refer to SET/RESET + to set/reset variable values. + See also SET TIME ZONE. - - If the TZ environment variable is not set the SHOW TIME ZONE statement - gives the message: Time zone is unknown @@ -118,13 +140,13 @@ Usage - -- show DateStyle; - SHOW DateStyle; - NOTICE:DateStyle is Postgres with US (NonEuropean) conventions +-- show DateStyle; +SHOW DateStyle; +NOTICE:DateStyle is Postgres with US (NonEuropean) conventions - -- show Geqo; - SHOW GEQO; - NOTICE:GEQO is ON +-- show Geqo; +SHOW GEQO; +NOTICE:GEQO is ON @@ -138,13 +160,13 @@ Compatibility -1998-08-31 +1998-09-24 SQL92 - There is no SET statement defined in SQL92. + There is no SET defined in SQL92. diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index 4fcb282ef0..3de2b83f6d 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -15,23 +15,23 @@ Replaces values of columns in a table -1998-04-15 +1998-09-24 UPDATE table SET column = expression [, ...] - [FROM fromlist] - [WHERE condition] + [ FROM fromlist ] + [ WHERE condition ] -1998-04-15 +1998-09-24 Inputs - + @@ -86,7 +86,7 @@ The name of a column in table. -1998-04-15 +1998-09-24 Outputs @@ -114,7 +114,7 @@ If <replaceable class="parameter">#</replaceable> <REFSECT1 ID="R1-SQL-UPDATE-1"> <REFSECT1INFO> -<DATE>1998-04-15</DATE> +<DATE>1998-09-24</DATE> </REFSECT1INFO> <TITLE> Description @@ -172,7 +172,7 @@ Compatibility <REFSECT2 ID="R2-SQL-UPDATE-4"> <REFSECT2INFO> -<DATE>1998-04-15</DATE> +<DATE>1998-09-24</DATE> </REFSECT2INFO> <TITLE> SQL92