diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml
index 91eea296a7f..07ea4d2ef6b 100644
--- a/doc/src/sgml/ref/allfiles.sgml
+++ b/doc/src/sgml/ref/allfiles.sgml
@@ -72,6 +72,7 @@
+
@@ -104,6 +105,7 @@
+
diff --git a/doc/src/sgml/ref/alter_user.sgml b/doc/src/sgml/ref/alter_user.sgml
index 52372d8ecfa..12426681a7b 100644
--- a/doc/src/sgml/ref/alter_user.sgml
+++ b/doc/src/sgml/ref/alter_user.sgml
@@ -1,22 +1,22 @@
-
-
-
+
+
+
ALTER USER
-
- SQL - Language Statements
-
-
-
+
+ SQL - Language Statements
+
+
+
ALTER USER
-
-
+
+
Modifies user account information
-
+
-
-
- 1998-09-08
-
+
+
+ 1998-09-08
+
ALTER USER username
[ WITH PASSWORD password ]
@@ -26,91 +26,91 @@ ALTER USER username
[ VALID UNTIL 'abstime' ]
-
-
- 1998-09-08
-
-
+
+
+ 1998-09-08
+
+
Inputs
-
-
+
+
Refer to CREATE USER for a detailed description of each
clause.
-
-
-
- username
-
-
-
+
+
+
+ username
+
+
+
The Postgres account name of the user whose details are to be altered.
-
-
-
+
+
+
-
-
- password
-
-
-
+
+
+ password
+
+
+
The new password to be used for this account.
-
-
-
+
+
+
-
-
- groupname
-
-
-
+
+
+ groupname
+
+
+
The name of an access group into which this account is to be put.
-
-
-
+
+
+
-
-
- abstime
-
-
-
+
+
+ abstime
+
+
+
The date (and, optionally, the time)
at which this user's access is to be terminated.
-
-
-
-
-
+
+
+
+
+
-
-
- 1998-09-08
-
-
+
+
+ 1998-09-08
+
+
Outputs
-
-
-
-
-
+
+
+
+
+
ALTER USER
-
-
-
+
+
+
Message returned if the alteration was successful.
-
-
-
+
+
+
-
-
+
+
ERROR: alterUser: user "username" does not exist
-
-
-
+
+
+
Error message returned if the user specified doesn't
exist.
@@ -118,17 +118,17 @@ ALTER USER username
-
-
+
+
-
-
- 1998-09-08
-
-
+
+
+ 1998-09-08
+
+
Description
-
-
+
+
ALTER USER is used to change the attributes of a user's
Postgres account.
Please note that it is not possible
@@ -137,21 +137,21 @@ ALTER USER username
Postgres
user or any user with read and modify permissions on
"pg_shadow" to alter user passwords.
-
+
If any of the clauses of the alter user statement are
omitted, the corresponding value in the "pg_shadow" table
is left unchanged.
-
-
- 1998-09-08
-
-
+
+
+ 1998-09-08
+
+
Notes
-
-
+
+
ALTER USER statement
is a Postgres
language extension.
@@ -162,37 +162,37 @@ ALTER USER username
account.
- In the current release (v6.4), the IN GROUP clause is parsed
+ In the current release (v6.5), the IN GROUP clause is parsed
but has no affect. When it is fully implemented, it is
intended to modify the pg_group relation.
-
+
-
-
+
+
Usage
-
-
+
+
Change a user password
-
-
+
+
ALTER USER davide WITH PASSWORD hu8jmn3;
-
+
Change a user's valid until date
-
+
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
-
+
Change a user's valid until date, specifying that his
authorisation should expire at midday on 4th May 1998 using
the time zone which is one hour ahead of UTC
-
+
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
-
+
Give a user the ability to create other users and new databases.
@@ -205,36 +205,36 @@ ALTER USER miriam CREATEUSER CREATEDB;
ALTER USER miriam IN GROUP sales, payroll;
-
+
-
-
+
+
Compatibility
-
-
-
+
+
+
-
-
- 1998-09-08
-
-
+
+
+ 1998-09-08
+
+
SQL92
-
-
+
+
There is no ALTER USER statement in
SQL92.
The standard leaves
the definition of users to the implementation.
-
+
-
+
-
-
- 1998-09-11
-
-
+
+
+ 1998-09-11
+
+
CONSTRAINT clause
-
-
+
+
SQL92 specifies some additional capabilities for constraints,
and also defines assertions and domain constraints.
@@ -1547,7 +1553,7 @@ the column. Not our problem...
-
+
An assertion is a special type of integrity constraint and share
the same namespace as other constraints.
However, an assertion is not necessarily dependent on one
@@ -1559,11 +1565,11 @@ the column. Not our problem...
CREATE ASSERTION name CHECK ( condition )
-
+
Domain constraints are defined by CREATE DOMAIN or ALTER DOMAIN
statements:
-
+
Domain constraint:
@@ -1650,17 +1656,17 @@ the column. Not our problem...
-
-
- 1998-09-11
-
-
+
+
+ 1998-09-11
+
+
CHECK clause
-
-
+
+
SQL92 specifies some additional capabilities for CHECK in either
table or column constraints.
-
+
diff --git a/doc/src/sgml/ref/create_user.sgml b/doc/src/sgml/ref/create_user.sgml
index 3ab3e2958d5..c0891949999 100644
--- a/doc/src/sgml/ref/create_user.sgml
+++ b/doc/src/sgml/ref/create_user.sgml
@@ -1,187 +1,200 @@
-
-
-
+
+
+
CREATE USER
-
- SQL - Language Statements
-
-
-
+
+ SQL - Language Statements
+
+
+
CREATE USER
-
-
+
+
Creates account information for a new user
-
+
-
-
- 1998-09-21
-
-
-CREATE USER username
- [ WITH PASSWORD password ]
+
+
+ 1998-09-21
+
+
+CREATE USER username
+ [ WITH PASSWORD password ]
[ CREATEDB | NOCREATEDB ]
[ CREATEUSER | NOCREATEUSER ]
- [ IN GROUP groupname [, ...] ]
- [ VALID UNTIL 'abstime' ]
-
+ [ IN GROUP groupname [, ...] ]
+ [ VALID UNTIL 'abstime' ]
+
-
-
- 1998-09-21
-
-
+
+
+ 1998-09-21
+
+
Inputs
-
-
-
-
-
- username
-
-
-
- The name of the user.
-
-
-
-
-
- password
-
-
-
- The WITH PASSWORD clause sets the user's password within
- the "pg_shadow" table. For this reason,
- "pg_shadow" is no
- longer accessible to the instance of Postgres that the
- Postgres user's password is initially set to NULL.
- The text here has got garbled.
- When a
- user's password in the "pg_shadow"
- table is NULL, user
- authentication proceeds as it historically has (HBA,
- PG_PASSWORD, etc). However, if a password is set for a
- user, a new authentication system supplants any other
- configured for the Postgres instance, and the password
- stored in the "pg_shadow" table is used
- for authentication.
- For more details on how this authentication system
- functions see pg_crypt(3). If the WITH PASSWORD clause is
- omitted, the user's password is set to the empty
- string with equates to a NULL value in the authentication
- system mentioned above.
-
-
-
-
-
- CREATEDB/NOCREATEDB
-
-
-
- These clauses define a user's ability to create databases.
- If CREATEDB is specified, the user being defined will
- be allowed to create his own databases. Using NOCREATEDB
- will deny a user the ability to create databases. If this
- clause is omitted, NOCREATEDB is used by default.
-
-
-
-
-
- CREATEUSER/NOCREATEUSER
-
-
-
- These clauses determine whether a user will be permitted to
- create new
- users in an instance of Postgres.
- Omitting this clause will set the user's value of this
- attribute to be NOCREATEUSER.
-
-
-
-
-
- groupname
-
-
-
- A name of a group into which to insert the user as a new member.
-
-
-
-
-
- abstime
-
-
-
- The VALID UNTIL clause sets an absolute time after which the
- user's Postgres login is no longer valid. Please note that
- if a user does not have a password defined in the
- "pg_shadow"
- table, the valid until date will not be checked
- during user authentication. If this clause is omitted,
- a NULL value is stored in "pg_shadow"
- for this attribute,
- and the login will be valid for all time.
-
-
-
+
+
+
+
+
+ username
+
+
+
+ The name of the user.
+
+
+
+
+
+
+ password
+
+
+
+ The WITH PASSWORD clause sets the user's password within
+ the "pg_shadow" table. For this reason,
+ "pg_shadow" is no
+ longer accessible to the instance of
+ Postgres that the
+ Postgres
+ user's password is initially set to NULL.
+
+
+ When a
+ user's password in the "pg_shadow"
+ table is NULL, user
+ authentication proceeds as it historically has (HBA,
+ PG_PASSWORD, etc). However, if a password is set for a
+ user, a new authentication system supplants any other
+ configured for the Postgres
+ instance, and the password
+ stored in the "pg_shadow" table is used
+ for authentication.
+ For more details on how this authentication system
+ functions see pg_crypt(3). If the WITH PASSWORD clause is
+ omitted, the user's password is set to the empty
+ string which equates to a NULL value in the authentication
+ system mentioned above.
+
+
+
+
+
+
+ CREATEDB/NOCREATEDB
+
+
+
+ These clauses define a user's ability to create databases.
+ If CREATEDB is specified, the user being defined will
+ be allowed to create his own databases. Using NOCREATEDB
+ will deny a user the ability to create databases. If this
+ clause is omitted, NOCREATEDB is used by default.
+
+
+
+
+
+
+ CREATEUSER/NOCREATEUSER
+
+
+
+ These clauses determine whether a user will be permitted to
+ create new
+ users in an instance of Postgres.
+ Omitting this clause will set the user's value of this
+ attribute to be NOCREATEUSER.
+
+
+
+
+
+
+ groupname
+
+
+
+ A name of a group into which to insert the user as a new member.
+
+
+
+
+
+
+ abstime
+
+
+
+ The VALID UNTIL clause sets an absolute time after which the
+ user's Postgres
+ login is no longer valid. Please note that
+ if a user does not have a password defined in the
+ "pg_shadow"
+ table, the valid until date will not be checked
+ during user authentication. If this clause is omitted,
+ a NULL value is stored in "pg_shadow"
+ for this attribute,
+ and the login will be valid for all time.
+
+
+
-
+
-
-
- 1998-09-21
-
-
+
+
+ 1998-09-21
+
+
Outputs
-
-
-
-
-
-
- CREATE USER
-
-
-
- Message returned if the command completes successfully.
-
-
-
-
-
- ERROR: removeUser: user "username" does not exist
-
-
-
- if "username" not found.
-
- I don't understand this and I don't know how to get
- this error message.
-
-
-
-
-
+
+
+
+
+
+
+ CREATE USER
+
+
+
+ Message returned if the command completes successfully.
+
+
+
+
+
+
+ ERROR: removeUser: user "username" does not exist
+
+
+
+ if "username" not found.
+
+ I don't understand this and I don't know how to get
+ this error message.
+
+
+
+
+
+
-
-
- 1998-09-21
-
-
+
+
+ 1998-09-21
+
+
Description
-
-
+
+
CREATE USER will add a new user to an instance of
Postgres.
-
-
+
+
The new user will be given a usesysid of:
'SELECT MAX(usesysid) + 1 FROM pg_shadow'.
This means that
@@ -196,18 +209,18 @@ CREATE USER username
for any given user,
use the "createuser" script provided with the Postgres
distribution.
-
+
-
-
- 1998-09-21
-
-
+
+
+ 1998-09-21
+
+
Notes
-
-
+
+
CREATE USER statement is a Postgres language extension.
-
+
Use DROP USER or ALTER USER statements to remove or modify a user
account.
@@ -229,68 +242,67 @@ CREATE USER username
| valuntil | abstime | 4 |
+--------------------------+--------------------------+-------+
-
+
-
-
+
+
Usage
-
-
+
+
Create a user with no password:
-
-
+
+
CREATE USER jonathan
-
-
+
+
Create a user with a password:
-
-
+
+
CREATE USER davide WITH PASSWORD jw8s0F4
-
+
Create a user with a password, whose account is valid until the end of 2001.
Note that after one second has ticked in 2002, the account is not
valid:
-
+
CREATE USER miriam WITH PASSWORD jw8s0F4 VALID UNTIL 'Jan 1 2002'
-
+
Create an account where the user can create databases:
-
+
CREATE USER manuel WITH PASSWORD jw8s0F4 CREATEDB
-
+
-
+
-
-
+
+
Compatibility
-
-
-
+
+
+
-
-
- 1998-09-21
-
-
+
+
+ 1998-09-21
+
+
SQL92
-
-
+
+
There is no CREATE USER statement in SQL92.
-
+
-
-
+
diff --git a/doc/src/sgml/ref/revoke.sgml b/doc/src/sgml/ref/revoke.sgml
index 5fc793ea1da..ad6184cca79 100644
--- a/doc/src/sgml/ref/revoke.sgml
+++ b/doc/src/sgml/ref/revoke.sgml
@@ -1,384 +1,409 @@
-
-
-
-REVOKE
-
-SQL - Language Statements
-
-
-
-REVOKE
-
-
-Revokes access privilege from a user, a group or all users.
-
-
-
-
-1998-09-24
-
-
-
-
-REVOKE privilege [, ...]
- ON object [, ...]
- FROM { PUBLIC | GROUP group | username }
-
+
+
+
+ REVOKE
+
+ SQL - Language Statements
+
+
+
+ REVOKE
+
+
+ Revokes access privilege from a user, a group or all users.
+
+
+
+
+ 1998-09-24
+
+
+REVOKE privilege [, ...]
+ ON object [, ...]
+ FROM { PUBLIC | GROUP ER">gBLE> | username }
+
-
-
- 1998-09-24
-
-
- Inputs
-
-
-
-
-
-
- privilege
-
-
-
- The possible privileges are:
-
-
-
+
+
+ 1998-09-24
+
+
+ Inputs
+
+
-
-
- SELECT
-
-
-
- Privilege to access all of the columns of a specific
- table/view.
-
-
-
-
-
-
- INSERT
-
-
-
- Privilege to insert data into all columns of a
- specific table.
-
-
-
-
-
-
- UPDATE
-
-
-
- Privilege to update all columns of a specific
- table.
-
-
-
-
-
-
- DELETE
-
-
-
- Privilege to delete rows from a specific table.
-
-
-
-
-
-
- RULE
-
-
-
- Privilege to define rules on table/view.
- (See CREATE RULE).
-
-
-
-
-
-
- ALL
-
-
-
- Rescind all privileges.
-
-
-
-
-
-
- object
-
-
-
- The name of an object from which to revoke access.
- The possible objects are:
-
-
-
- table
-
-
-
-
-
- view
-
-
-
-
-
- sequence
-
-
-
-
-
- index
-
-
-
-
-
-
-
-
-
- group
-
-
-
- The name of a group from whom to revoke privileges.
-
-
-
-
-
-
- username
-
-
-
- The name of a user from whom revoke privileges. Use the PUBLIC keyword
- to specify all users.
-
-
-
-
-
-
- PUBLIC
-
-
-
- Rescind the specified privilege(s) for all users.
-
-
-
-
-
-
+
+
+
+ privilege
+
+
+
+ The possible privileges are:
+
+
+
-
-
- 1998-09-24
-
-
- Outputs
-
-
-
-
-
-
- CHANGE
-
-
-
- Message returned if successfully.
-
-
-
-
-
-
- ERROR
-
-
-
- Message returned if object is not available or impossible
- to revoke privileges from a group or users.
-
-
-
-
-
-
-
-
-
-
- 1998-09-24
-
-
- Description
-
-
- REVOKE allows creator of an object to revoke permissions granted
- before, from all users (via PUBLIC) or a certain user or group.
-
+
+
+ SELECT
+
+
+
+ Privilege to access all of the columns of a specific
+ table/view.
+
+
+
-
-
- 1998-09-24
-
-
- Notes
-
-
- Refer to psql \z command for further information about permissions
- on existing objects:
-
-
- 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
-
-
-
-
- Currently, to create a GROUP you have to insert
- data manually into table pg_group as:
-
- INSERT INTO pg_group VALUES ('todos');
- CREATE USER miriam IN GROUP todos;
-
-
-
+
+
+ INSERT
+
+
+
+ Privilege to insert data into all columns of a
+ specific table.
+
+
+
-
-
+
+
+ UPDATE
+
+
+
+ Privilege to update all columns of a specific
+ table.
+
+
+
-
-
- Usage
-
-
-
- -- 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;
-
-
-
-
-
-
- Compatibility
-
-
-
-
- 1998-09-01
-
-
- SQL92
-
-
- The SQL92 syntax for REVOKE
- has additional capabilities for rescinding
- privileges, including those on individual columns in tables:
+
+
+ DELETE
+
+
+
+ Privilege to delete rows from a specific table.
+
+
+
-
-
-
-
- REVOKE { SELECT | DELETE | USAGE | ALL PRIVILEGES } [, ...]
- ON object
- FROM { PUBLIC | username [, ...] } { RESTRICT | CASCADE }
- REVOKE { INSERT | UPDATE | REFERENCES } [, ...] [ ( column [, ...] ) ]
- ON object
- FROM { PUBLIC | username [, ...] } { RESTRICT | CASCADE }
-
-
-
-
- Refer to the GRANT command for details on individual fields.
-
-
-
-
-
-
-
- REVOKE GRANT OPTION FOR privilege [, ...]
- ON object
- FROM { PUBLIC | username [, ...] } { RESTRICT | CASCADE }
-
-
-
-
- Rescinds authority for a user to grant the specified privilege to others.
- Refer to the GRANT command for details on individual fields.
-
-
-
-
-
+
+
+ RULE
+
+
+
+ Privilege to define rules on table/view.
+ (See CREATE RULE).
+
+
+
+
+
+
+ ALL
+
+
+
+ Rescind all privileges.
+
+
+
+
+
+
+ object
+
+
+
+ The name of an object from which to revoke access.
+ The possible objects are:
+
+
- The possible objects are:
-
- [ TABLE ] table/view
-
- CHARACTER SET character-set
-
- COLLATION collation
-
- TRANSLATION translation
-
- DOMAIN domain
-
-
-
-
- If user1 gives a privilege WITH GRANT OPTION to user2,
- and user2 gives it to user3 then user1 can revoke
- this privilege in cascade using the CASCADE keyword.
+ table
+
+
+
- If user1 gives a privilege WITH GRANT OPTION to user2,
- and user2 gives it to user3 then if user1 try revoke
- this privilege it fails if he/she specify the RESTRICT
- keyword.
+ view
-
-
-
+
+
+
+
+ sequence
+
+
+
+
+
+ index
+
+
+
+
+
+
+
+
+
+ group
+
+
+
+ The name of a group from whom to revoke privileges.
+
+
+
+
+
+
+ username
+
+
+
+ The name of a user from whom revoke privileges. Use the PUBLIC keyword
+ to specify all users.
+
+
+
+
+
+
+ PUBLIC
+
+
+
+ Rescind the specified privilege(s) for all users.
+
+
+
+
+
+
+
+
+
+ 1998-09-24
+
+
+ Outputs
+
+
+
+
+
+
+ CHANGE
+
+
+
+ Message returned if successfully.
+
+
+
+
+
+
+ ERROR
+
+
+
+ Message returned if object is not available or impossible
+ to revoke privileges from a group or users.
+
+
+
+
+
+
+
+
+
+
+ 1998-09-24
+
+
+ Description
+
+
+ REVOKE allows creator of an object to revoke permissions granted
+ before, from all users (via PUBLIC) or a certain user or group.
+
+
+
+
+ 1998-09-24
+
+
+ Notes
+
+
+ Refer to psql \z command for further information about permissions
+ on existing objects:
+
+
+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
+
+
+
+
+ Currently, to create a GROUP you have to insert
+ data manually into table pg_group as:
+
+INSERT INTO pg_group VALUES ('todos');
+CREATE USER miriam IN GROUP todos;
+
+
+
+
+
+
+
+
+
+ Usage
+
+
+
+-- 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;
+
+
+
+
+
+
+ Compatibility
+
+
+
+
+ 1998-09-01
+
+
+ SQL92
+
+
+ The SQL92 syntax for REVOKE
+ has additional capabilities for rescinding
+ privileges, including those on individual columns in tables:
+
+
+
+
+
+REVOKE { SELECT | DELETE | USAGE | ALL PRIVILEGES } [, ...]
+ ON object
+ FROM { PUBLIC | username [, ...] } { RESTRICT | CASCADE }
+REVOKE { INSERT | UPDATE | REFERENCES } [, ...] [ ( column [, ...] ) ]
+ ON object
+ FROM { PUBLIC | username [, ...] } { RESTRICT | CASCADE }
+
+
+
+
+ Refer to GRANT for details on individual fields.
+
+
+
+
+
+
+
+REVOKE GRANT OPTION FOR privilege [, ...]
+ ON object
+ FROM { PUBLIC | username [, ...] } { RESTRICT | CASCADE }
+
+
+
+
+ Rescinds authority for a user to grant the specified privilege
+ to others.
+ Refer to the GRANT command for details
+ on individual fields.
+
+
+
+
+
+
+ The possible objects are:
+
+
+ [ TABLE ] table/view
+
+
+ CHARACTER SET character-set
+
+
+ COLLATION collation
+
+
+ TRANSLATION translation
+
+
+ DOMAIN domain
+
+
+
+
+
+ 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.
+
+
+ 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.
+
+
+
+
+
+
diff --git a/doc/src/sgml/ref/rollback.sgml b/doc/src/sgml/ref/rollback.sgml
index d0fa6ec3d02..01c095736da 100644
--- a/doc/src/sgml/ref/rollback.sgml
+++ b/doc/src/sgml/ref/rollback.sgml
@@ -1,133 +1,154 @@
-
-
-
+
+
+
ROLLBACK
-
-SQL - Language Statements
-
-
-
+
+ SQL - Language Statements
+
+
+
ROLLBACK
-
-
-Aborts the current transaction
-
-
-
-
-1998-09-24
-
-
-ROLLBACK [ WORK ]
-
+
+
+ Aborts the current transaction
+
+
+
+
+ 1998-09-24
+
+
+ROLLBACK [ WORK | TRANSACTION ]
+
-
-
- 1998-09-24
-
-
- Inputs
-
-
- None.
-
-
+
+
+ 1998-09-24
+
+
+ Inputs
+
+
+ None.
+
+
-
-
- 1998-09-24
-
-
- Outputs
-
-
-
-
-
-
- ABORT
-
-
-
- Message returned if successful.
-
-
-
-
-
-
- NOTICE: UserAbortTransactionBlock and not in in-progress state
- ABORT
-
-
-
- If there is not any transaction currently in progress.
-
-
-
-
-
-
-
-
-
-
- 1998-09-24
-
-
- Description
-
-
- ROLLBACK rolls back the current transaction and causes
- all the updates made by the transaction to be discarded.
-
-
-
- 1998-09-24
-
-
- Notes
-
-
- The keyword WORK is noise and can be omitted.
-
-
- Use the COMMIT statement to successfully
- terminate a transaction.
-
-
-
-
-
-
- Usage
-
-
-
- --To abort all changes:
- --
- ROLLBACK WORK;
-
-
-
-
-
-
- Compatibility
-
-
-
+
+
+ 1998-09-24
+
+
+ Outputs
+
+
-
-
- 1998-09-24
-
-
- SQL92
-
-
- Full compatibility.
-
-
-
-
+
+
+
+ ABORT
+
+
+
+ Message returned if successful.
+
+
+
+
+
+
+ NOTICE: UserAbortTransactionBlock and not in in-progress state
+ ABORT
+
+
+
+ If there is not any transaction currently in progress.
+
+
+
+
+
+
+
+
+
+
+ 1998-09-24
+
+
+ Description
+
+
+
+ ROLLBACK rolls back the current transaction and causes
+ all the updates made by the transaction to be discarded.
+
+
+
+
+ 1998-09-24
+
+
+ Notes
+
+
+ The keywords WORK and TRANSACTION are noise and can be omitted.
+
+
+
+ Use
+ to successfully terminate a transaction.
+
+
+
+
+
+
+ Usage
+
+
+
+ --To abort all changes:
+ --
+ ROLLBACK WORK;
+
+
+
+
+
+
+ Compatibility
+
+
+
+
+
+
+ 1998-09-24
+
+
+ SQL92
+
+
+ Full compatibility. TRANSACTION is a
+ Postgres extension.
+
+
+
+
+
+
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 110ec117c2d..4e983118739 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -18,13 +18,16 @@ SELECT
SELECT [ALL|DISTINCT [ON column] ]
- expression [ AS name ] [, ...]
+ expression [ AS
+ name ] [, ...]
[ INTO [TEMP] [TABLE] new_table ]
- [ FROM table [alias ] [, ...] ]
+ [ FROM table
+ [alias ] [, ...] ]
[ WHERE condition ]
[ GROUP BY column [, ...] ]
[ HAVING condition [, ...] ]
- [ { UNION [ALL] | INTERSECT | EXCEPT } select ]
+ [ { UNION [ALL] | INTERSECT | EXCEPT } select ]
[ ORDER BY column [ ASC | DESC ] [, ...] ]
[ FOR UPDATE [OF class_name...]]
[ LIMIT count [OFFSET|, count]]
@@ -66,17 +69,17 @@ SELECT [ALL|DISTINCT [ON column] ]
-
-
+
+
TEMP
-
-
-
+
+
+
The table is created unique to this session, and is
automatically dropped on session exit.
-
-
-
+
+
+
@@ -215,7 +218,8 @@ SELECT [ALL|DISTINCT [ON column] ]
DISTINCT will eliminate all duplicate rows from the
selection.
DISTINCT ON column will eliminate all duplicates in the specified column; this is
-equivalent to using GROUP BY column. ALL will return all candidate rows,
+equivalent to using GROUP BY column. ALL will return all candidate rows,
including duplicates.
@@ -269,7 +273,9 @@ including duplicates.
The optional WHERE condition has the general form:
-WHERE expr cond_op expr [ log_op ... ]
+WHERE expr ETER">ce"PARreplaceable> [ log_op ... ]
where cond_op can be
@@ -381,7 +387,8 @@ SELECT name FROM distributors ORDER BY code;
-table_query UNION [ ALL ] table_query
+table_query UNION [ ALL ]
+table_query
[ ORDER BY column [ ASC | DESC ] [, ...] ]
@@ -417,7 +424,8 @@ SELECT name FROM distributors ORDER BY code;
-table_query INTERSECT table_query
+table_query INTERSECT
+table_query
[ ORDER BY column [ ASC | DESC ] [, ...] ]
@@ -448,7 +456,8 @@ SELECT name FROM distributors ORDER BY code;
-table_query EXCEPT table_query
+table_query EXCEPT
+ table_query
[ ORDER BY column [ ASC | DESC ] [, ...] ]
@@ -485,25 +494,25 @@ SELECT f.title, f.did, d.name, f.date_prod, f.kind
FROM distributors d, films f
WHERE f.did = d.did
- title |did|name | date_prod|kind
- -------------------------+---+----------------+----------+----------
- The Third Man |101|British Lion |1949-12-23|Drama
- The African Queen |101|British Lion |1951-08-11|Romantic
- Une Femme est une Femme |102|Jean Luc Godard |1961-03-12|Romantic
- Vertigo |103|Paramount |1958-11-14|Action
- Becket |103|Paramount |1964-02-03|Drama
- 48 Hrs |103|Paramount |1982-10-22|Action
- War and Peace |104|Mosfilm |1967-02-12|Drama
- West Side Story |105|United Artists |1961-01-03|Musical
- Bananas |105|United Artists |1971-07-13|Comedy
- Yojimbo |106|Toho |1961-06-16|Drama
- There's a Girl in my Soup|107|Columbia |1970-06-11|Comedy
- Taxi Driver |107|Columbia |1975-05-15|Action
- Absence of Malice |107|Columbia |1981-11-15|Action
- Storia di una donna |108|Westward |1970-08-15|Romantic
- The King and I |109|20th Century Fox|1956-08-11|Musical
- Das Boot |110|Bavaria Atelier |1981-11-11|Drama
- Bed Knobs and Broomsticks|111|Walt Disney | |Musical
+title |did|name | date_prod|kind
+-------------------------+---+----------------+----------+----------
+The Third Man |101|British Lion |1949-12-23|Drama
+The African Queen |101|British Lion |1951-08-11|Romantic
+Une Femme est une Femme |102|Jean Luc Godard |1961-03-12|Romantic
+Vertigo |103|Paramount |1958-11-14|Action
+Becket |103|Paramount |1964-02-03|Drama
+48 Hrs |103|Paramount |1982-10-22|Action
+War and Peace |104|Mosfilm |1967-02-12|Drama
+West Side Story |105|United Artists |1961-01-03|Musical
+Bananas |105|United Artists |1971-07-13|Comedy
+Yojimbo |106|Toho |1961-06-16|Drama
+There's a Girl in my Soup|107|Columbia |1970-06-11|Comedy
+Taxi Driver |107|Columbia |1975-05-15|Action
+Absence of Malice |107|Columbia |1981-11-15|Action
+Storia di una donna |108|Westward |1970-08-15|Romantic
+The King and I |109|20th Century Fox|1956-08-11|Musical
+Das Boot |110|Bavaria Atelier |1981-11-11|Drama
+Bed Knobs and Broomsticks|111|Walt Disney | |Musical
To sum the column len of all films and group
@@ -587,14 +596,14 @@ SELECT actors.name
FROM actors
WHERE actors.name LIKE 'W%'
- name
- --------------
- Walt Disney
- Walter Matthau
- Warner Bros.
- Warren Beatty
- Westward
- Woody Allen
+name
+--------------
+Walt Disney
+Walter Matthau
+Warner Bros.
+Warren Beatty
+Westward
+Woody Allen
@@ -693,85 +702,10 @@ SELECT distributors.* WHERE name = 'Westwood';
-
-
-
-SELECT INTO
-
- 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 [TEMP] [ TABLE ] new_table ]
- [ FROM table [alias] [, ...] ]
- [ WHERE condition ]
- [ GROUP BY column [, ...] ]
- [ HAVING condition [, ...] ]
- [ { UNION [ALL] | INTERSECT | EXCEPT } select]
- [ ORDER BY column [ ASC | DESC ] [, ...] ]
- [ FOR UPDATE [OF class_name...]]
- [ LIMIT count [OFFSET|, count]]
-
-
-
-
- 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/set.sgml b/doc/src/sgml/ref/set.sgml
index f7850a839fd..9e4f7a4dee7 100644
--- a/doc/src/sgml/ref/set.sgml
+++ b/doc/src/sgml/ref/set.sgml
@@ -18,7 +18,8 @@
1998-09-24
-SET variable { TO | = } { 'value' | DEFAULT }
+SET variable { TO | = } {
+ 'value' | DEFAULT }
SET TIME ZONE { 'timezone' | LOCAL | DEFAULT };
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED }
diff --git a/doc/src/sgml/ref/show.sgml b/doc/src/sgml/ref/show.sgml
index 4db7531fbdf..45dd3800d75 100644
--- a/doc/src/sgml/ref/show.sgml
+++ b/doc/src/sgml/ref/show.sgml
@@ -1,171 +1,189 @@
-
-
-
-SHOW
-
-SQL - Language Statements
-
-
-
-SHOW
-
-
-Shows run-time parameters for session
-
-
-
-
-1998-09-24
-
-
-SHOW variable
-
+
+
+
+ SHOW
+
+ SQL - Language Statements
+
+
+
+ SHOW
+
+
+ Shows run-time parameters for session
+
+
+
+
+ 1998-09-24
+
+
+SHOW variable
+
-
-
- 1998-09-24
-
-
- Inputs
-
-
-
-
-
-
- variable
-
-
-
- Refer to SET for more information on available
- variables.
-
-
-
-
-
-
+
+
+ 1998-09-24
+
+
+ Inputs
+
+
-
-
- 1998-09-24
-
-
- Outputs
-
-
-
-
-
-
- NOTICE: variable is value
- SHOW VARIABLE
-
-
-
- Message returned if successfully.
-
-
-
-
-
- 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.
-
-
-
-
-
-
-
+
+
+
+ variable
+
+
+
+ Refer to SET for more information on available
+ variables.
+
+
+
+
+
+
-
-
- 1998-09-24
-
-
- Description
-
-
- 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.
- Parameters and values are case-insensitive.
-
+
+
+ 1998-09-24
+
+
+ Outputs
+
+
-
-
- 1998-09-24
-
-
- Notes
-
-
- The SHOW is a Postgres
- language extension.
-
-
- Refer to SET/RESET
- to set/reset variable values.
- See also SET TIME ZONE.
-
-
-
+
+
+
+ NOTICE: ">variabE> is value
+ SHOW VARIABLE
+
+
+
+ Message returned if successfully.
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+
-
-
- Usage
-
-
-
- -- show DateStyle;
- SHOW DateStyle;
- NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
-
- -- show Geqo;
- SHOW GEQO;
- NOTICE:GEQO is ON
-
-
-
+
+
+ 1998-09-24
+
+
+ Description
+
+
+ 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.
+ Parameters and values are case-insensitive.
+
-
-
- Compatibility
-
-
-
-
-
-
- 1998-09-24
-
-
- SQL92
-
-
- There is no SET defined in SQL92.
-
-
-
-
+
+
+ 1998-09-24
+
+
+ Notes
+
+
+ The SHOW is a Postgres
+ language extension.
+
+
+ Refer to SET/RESET
+ to set/reset variable values.
+ See also SET TIME ZONE.
+
+
+
+
+
+
+ Usage
+
+
+
+-- show DateStyle;
+SHOW DateStyle;
+NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
+
+-- show Geqo;
+SHOW GEQO;
+NOTICE:GEQO is ON
+
+
+
+
+
+
+ Compatibility
+
+
+
+
+
+
+ 1998-09-24
+
+
+ SQL92
+
+
+ There is no SHOW defined in SQL92.
+
+
+
+
+
+