diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index cc25948e59..fe898b0dbe 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -182,7 +182,7 @@ The keyword COLUMN is noise and can be omitted. [*] following a name of a table indicates that statement should be run over that table and all tables below it in the inheritance hierarchy. - The PostgreSQL User's Guide has further + The PostgreSQL User's Guide has further information on inheritance. diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index 65ce768763..8c6a2006d6 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -41,7 +41,7 @@ CREATE [ UNIQUE ] INDEX index_name Causes the system to check for - duplicate values when the index is created (if data + duplicate values in the table when the index is created (if data already exist) and each time data is added. Attempts to insert or update non-duplicate data will generate an error. @@ -76,7 +76,7 @@ CREATE [ UNIQUE ] INDEX index_name the name of the access method which is to be used for the index. The default access method is BTREE. - Postgres provides three access methods for secondary indices: + Postgres provides three access methods for secondary indexes: BTREE @@ -208,14 +208,14 @@ SELECT am.amname AS acc_name, Description - This command constructs an index + CREATE INDEX constructs an index index_name. on the specified table. -Indices are primarily used to enhance database performance. +Indexes are primarily used to enhance database performance. But inappropriate use will result in slower performance. @@ -236,7 +236,7 @@ But inappropriate use will result in slower performance. on the result of a user-defined function func_name applied to one or more attributes of a single class. These functional - indices can be used to obtain fast access to data + indexes can be used to obtain fast access to data based on operators that would normally require some transformation to apply them to the base data. @@ -250,7 +250,7 @@ But inappropriate use will result in slower performance. Currently, only the BTREE access method supports multi-column - indices. Up to 7 keys may be specified. + indexes. Up to 7 keys may be specified. Use DROP INDEX diff --git a/doc/src/sgml/ref/create_language.sgml b/doc/src/sgml/ref/create_language.sgml index 73e409c42a..5b2bbaa5a4 100644 --- a/doc/src/sgml/ref/create_language.sgml +++ b/doc/src/sgml/ref/create_language.sgml @@ -40,9 +40,10 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE 'langname< TRUSTED specifies that the call handler for the language is safe; that is, it offers an unprivileged user - no functionality to get around access restrictions. If + no functionality to bypass access restrictions. If this keyword is omitted when registering the language, - only users with the PostgreSQL superuser privilege can use + only users with the Postgres +superuser privilege can use this language to create new functions (like the 'C' language). @@ -58,17 +59,17 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE 'langname< The name of the new procedural language. The language name is case insensitive. A procedural language cannot override one of the built-in languages of - PostgreSQL. + Postgres. - call_handler + HANDLER call_handler - The argument for HANDLER is the name + call_handler is the name of a previously registered function that will be called to execute the PL procedures. @@ -86,7 +87,7 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE 'langname< inserted in the LANCOMPILER attribute of the new pg_language entry. At present, - PostgreSQL doesn't use + Postgres does not use this attribute in any way. @@ -364,7 +365,8 @@ CREATE PROCEDURAL LANGUAGE 'plsample' SQL92 - There is no CREATE LANGUAGE statement in SQL92. + There is no CREATE LANGUAGE statement in + SQL92. diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 798e02fbf6..c462c1eadc 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -15,25 +15,25 @@ - 1998-04-15 + 1998-09-11 - CREATE TABLE table ( - column type [DEFAULT value] [CONSTRAINT column_constraint] [, ...] - [, column ...] - [, CONSTRAINT table_constraint] - ) [INHERITS ( inherited_table [, ...] )] +CREATE TABLE table ( + column type [ DEFAULT value | column_constraint_clause | PRIMARY KEY } [ ... ] ] + [, ... ] + [, PRIMARY KEY ( column [, ...] ) ] + [, table_constraint_clause ] + ) [ INHERITS ( inherited_table [, ...] ) ] - 1998-04-15 + 1998-09-11 Inputs - @@ -64,16 +64,16 @@ - The type of the column. - (Refer to the Postgres User's Guide for - further information about data types). + The type of the column. This may include array specifiers. + Refer to the PostgreSQL User's Guide for + further information about data types and arrays. - value + DEFAULT value @@ -85,37 +85,63 @@ - inherited_table + column_constraint_clause + + + + The optional column constraint clause specifies a list of integrity + constraints which new or updated entries must satisfy for + an insert or update operation to succeed. Each constraint + must evaluate to a boolean expression. Although SQL92 +requires the column_constraint_clause + to refer to that column only, Postgres + allows multiple columns + to be referenced within a single column constraint. + See the column constraint clause for more information. + + + + + + + table_constraint_clause + + + + The optional table CONSTRAINT clause specifies a list of integrity + constraints which new or updated entries must satisfy for + an insert or update operation to succeed. Each constraint + must evaluate to a boolean expression. Multiple columns + may be referenced within a single constraint. + See the table constraint clause for more information. + + + + + + + INHERITS inherited_table The optional INHERITS clause specifies a collection of table names from which this table automatically inherits all fields. - If any inherited field name appears more than once, PostgreSQL - reports an error. PostgreSQL automatically allows the created + If any inherited field name appears more than once, +Postgres + reports an error. + Postgres automatically allows the created table to inherit functions on tables above it in the inheritance - hierarchy. Inheritance of functions is done according + hierarchy. + +Aside + + Inheritance of functions is done according to the conventions of the Common Lisp Object System (CLOS). + - - - column_constraint - table_constraint - - - - The optional CONSTRAINT clause specifies a list of integrity - constraints which new or updated entries must satisfy for - an insert or update operation to succeed. Each constraint - must evaluate to a boolean expression. Multiple columns - may be referenced within a single constraint. - See CONSTRAINT clause for more information. - - - @@ -123,7 +149,7 @@ - 1998-04-15 + 1998-09-11 Outputs @@ -158,13 +184,26 @@ Message returned if table creation failed. This is usually accompanied by some descriptive text, such as: <ProgramListing> - amcreate: "<replaceable class="parameter">table</replaceable>" relation already exists +amcreate: "<replaceable class="parameter">table</replaceable>" relation already exists </ProgramListing> which occurs at runtime, if the table specified already exists in the database. </PARA> </LISTITEM> </VARLISTENTRY> + + <VARLISTENTRY> + <TERM> + <ReturnValue>ERROR: DEFAULT: type mismatched</ReturnValue> + </TERM> + <LISTITEM> + <PARA> + if data type of default value doesn't match the + column definition's data type. + </PARA> + </LISTITEM> + </VARLISTENTRY> + </VARIABLELIST> </PARA> </LISTITEM> @@ -175,13 +214,13 @@ <REFSECT1 ID="R1-SQL-CREATETABLE-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-11</DATE> </REFSECT1INFO> <TITLE> Description - CREATE TABLE will enter a new table into the current data + CREATE TABLE will enter a new table into the current data base. The table will be "owned" by the user issuing the command. @@ -194,34 +233,35 @@ a system catalog table. - - - 1998-04-15 - + + + + 1998-09-11 + - DEFAULT clause + DEFAULT Clause - DEFAULT value +DEFAULT value - - The DEFAULT clause assigns a default data value to a column. - - - - - - - + + + + 1998-09-11 + + + Inputs + + - value + value - The possible values for expression are: + The possible values for the default value expression are: @@ -243,19 +283,24 @@ - - - ERROR: DEFAULT: type mismatched - - - - if data type of default value doesn't match the - column definition's data type. - - - - + + + 1998-09-11 + + + Outputs + + + + + + 1998-09-11 + + + Description + + The DEFAULT clause assigns a default data value to a column (via a column definition in the CREATE TABLE statement). The data type of a default value must match the column definition's @@ -273,7 +318,8 @@ is the value of the specified function at the time of the INSERT. - There are two types of niladic functions: + There are two types of niladic functions: + niladic USER @@ -325,53 +371,208 @@ - - - - - - + + +In the current release (v6.4), Postgres +evaluates all default expressions at the time the table is defined. +Hence, functions which are "non-cacheable" such as + CURRENT_TIMESTAMP may not produce the desired +effect. For the particular case of date/time types, one can work +around this behavior by using + +DEFAULT TEXT 'now' + +instead of + +DEFAULT 'now' + +or + +DEFAULT CURRENT_TIMESTAMP +. +This forces Postgres to consider the constant a string +type and then to convert the value to timestamp at runtime. + + - 1998-04-15 + 1998-09-11 - NOT NULL constraint + Usage + + + To assign a constant value as the default for the + columns did and number, + and a string literal to the column did: + + +CREATE TABLE video_sales ( + did VARCHAR(40) DEFAULT 'luso films', + number INTEGER DEFAULT 0, + total CASH DEFAULT '$0.0' +); + + + + To assign an existing sequence + as the default for the column did, + and a literal to the column name: + + +CREATE TABLE distributors ( + did DECIMAL(3) DEFAULT NEXTVAL('serial'), + name VARCHAR(40) DEFAULT 'luso films' +); + + + + + + + 1998-09-11 + + + Column CONSTRAINT Clause + + + +[ CONSTRAINT name ] { NOT NULL | UNIQUE | PRIMARY KEY | CHECK constraint } [, ...] + + + + + 1998-09-11 + + + Inputs + + + + + + name + + + + An arbitrary name given to the integrity constraint. +If name is not specified, + it is generated from the table and column names, +which should ensure uniqueness for + name. + + + + + + + NOT NULL + + + +The column is not allowed to contain NULL values. +This is equivalent to the column constraint + CHECK (column NOT NULL). + + + + + + + UNIQUE + + + +The column must have unique values. In Postgres +this is enforced by an implicit creation of a unique index on the table. + + + + + + + PRIMARY KEY + + + + This column is a primary key, which implies that uniqueness is +enforced by the system and that other tables may rely on this column +as a unique identifier for rows. + See PRIMARY KEY for more information. + + + + + + + constraint + + + + The definition of the constraint. + + + + + + + + 1998-09-11 + + + Description + + + A Constraint is a named rule: an SQL object which helps define + valid sets of values by putting limits on the results of INSERT, + UPDATE or DELETE operations performed on a Base Table. + + + There are two ways to define integrity constraints: + table constraints, covered later, and column constraints, covered here. + + + A column constraint is an integrity constraint defined as part + of a column definition, and logically becomes a table + constraint as soon as it is created. The column + constraints available are: + + PRIMARY KEY + REFERENCES + UNIQUE + CHECK + NOT NULL + + + + Postgres does not yet +(at release 6.4) support + REFERENCES integrity constraints. The parser +accepts the REFERENCES syntax but ignores the clause. + + + + + + 1998-09-11 + + + NOT NULL Constraint - [ CONSTRAINT name ] NOT NULL +[ CONSTRAINT name ] NOT NULL The NOT NULL constraint specifies a rule that a column may contain only non-null values. - The NOT NULL constraint is a column constraint. + The NOT NULL constraint is a column constraint only, and not allowed +as a table constraint. - - - - - - - - - - name - - - - The optional name of a constraint. - - - - - - - - + - 1998-04-15 + 1998-09-11 Outputs @@ -381,6 +582,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -401,34 +603,434 @@ </LISTITEM> </VARLISTENTRY> </VARIABLELIST> - </REFSECT3> - </REFSECT2> - + + <REFSECT3 ID="R3-SQL-NOTNULL-2"> + <REFSECT3INFO> + <DATE>1998-09-11</DATE> + </REFSECT3INFO> + <TITLE> +Description + + + + + + 1998-09-11 + + +Usage + + + + Define two NOT NULL column constraints on the table + distributors, +one of which being a named constraint: + + +CREATE TABLE distributors ( + did DECIMAL(3) CONSTRAINT no_null NOT NULL, + name VARCHAR(40) NOT NULL +); + + - 1998-04-15 + 1998-09-11 - UNIQUE constraint + UNIQUE Constraint - - Table Constraint definition - - [ CONSTRAINT name ] UNIQUE ( column [, ...] ) - - - Column Constraint definition - - - [ CONSTRAINT name ] UNIQUE +[ CONSTRAINT name ] UNIQUE + - Parameters + Inputs + - name + CONSTRAINT name + + + + An arbitrary label given to a constraint. + + + + + + + + Outputs + + + + +status + + + + + + +ERROR: Cannot insert a duplicate key into a unique index. + + + + This error occurs at runtime if one tries to insert a + duplicate value into a column. + + + + + + + + + + + +Description + + + + The UNIQUE constraint specifies a rule that a group of one or + more distinct columns of a table may contain only unique values. + + + The column definitions of the specified columns do not have to + include a NOT NULL constraint to be included in a UNIQUE + constraint. Having more than one null value in a column without a + NOT NULL constraint, does not violate a UNIQUE constraint. +(This deviates from the SQL92 definition, but +is a more sensible convention. See the section on compatibility +for more details.). + + + Each UNIQUE column constraint must name a column that is + different from the set of columns named by any other UNIQUE or + PRIMARY KEY constraint defined for the table. + + + + Postgres automatically creates a unique + index for each UNIQUE constraint, to assure + data integrity. See CREATE INDEX for more information. + + + + + +Usage + + + + Defines a UNIQUE column constraint for the table distributors. + UNIQUE column constraints can only be defined on one column + of the table: + + CREATE TABLE distributors ( + did DECIMAL(3), + name VARCHAR(40) UNIQUE + ); + +which is equivalent to the following specified as a table constraint: + +CREATE TABLE distributors ( + did DECIMAL(3), + name VARCHAR(40), + UNIQUE(name) +); + + + + + 1998-09-11 + + +The CHECK Constraint + + +[ CONSTRAINT name ] CHECK ( condition [, ...] ) + + + Inputs + + + + + name + + + + An arbitrary name given to a constraint. + + + + + + condition + + + + Any valid conditional expression evaluating to a boolean result. + + + + + + + + + 1998-09-11 + + + Outputs + + + + + +status + + + + + + + + + ERROR: ExecAppend: rejected due to CHECK constraint + "table_column". + + + + + This error occurs at runtime if one tries to insert an illegal + value into a column subject to a CHECK constraint. + + + + + + + + + + + Description + + The CHECK constraint specifies a restriction on allowed values +within a column. + The CHECK constraint is also allowed as a table constraint. + + + The SQL92 CHECK column constraints can only be defined on, and + refer to, one column of the table. Postgres + does not have + this restriction. + + + + + + + 1998-09-11 + + + PRIMARY KEY Constraint + + +[ CONSTRAINT name ] PRIMARY KEY + + + + Inputs + + + + +CONSTRAINT name + + + + An arbitrary name for the constraint. + + + + + + + + + Outputs + + + +ERROR: Cannot insert a duplicate key into a unique index. + + + + This occurs at run-time if one tries to insert a duplicate value into + a column subject to a PRIMARY KEY constraint. + + + + + + + + Description + + The PRIMARY KEY column constraint specifies that a column of a table + may contain only unique + (non-duplicate), non-NULL values. The definition of + the specified column does not have to include an explicit NOT NULL + constraint to be included in a PRIMARY KEY constraint. + + + Only one PRIMARY KEY can be specified for a table. + + + + + + 1998-09-11 + + + Notes + + + Postgres automatically creates + a unique index to assure + data integrity. (See CREATE INDEX statement) + + + The PRIMARY KEY constraint should name a set of columns that is + different from other sets of columns named by any UNIQUE constraint + defined for the same table, since it will result in duplication +of equivalent indexes and unproductive additional runtime overhead. +However, Postgres does not specifically +disallow this. + + + + + + 1998-09-11 + + + Table CONSTRAINT Clause + + + +[ CONSTRAINT name ] { PRIMARY KEY | UNIQUE } ( column [, ...] ) +[ CONSTRAINT name ] CHECK ( constraint ) + + + + + + 1998-09-11 + + +Inputs + + + + + + + CONSTRAINT name + + + + An arbitrary name given to an integrity constraint. + + + + + + column [, ...] + + + + The column name(s) for which to define a unique index +and, for PRIMARY KEY, a NOT NULL constraint. + + + + + CHECK ( constraint ) + + + + A boolean expression to be evaluated as the constraint. + + + + + + + + 1998-09-11 + + +Outputs + + + +The possible outputs for the table constraint clause are the same +as for the corresponding portions of the column constraint clause. + + + + 1998-09-11 + + +Description + + + + A table constraint is an integrity constraint defined on one or + more columns of a base table. The four variations of "Table + Constraint" are: + + UNIQUE + CHECK + PRIMARY KEY + FOREIGN KEY + + + + + Postgres does not yet +(as of version 6.4) support FOREIGN KEY +integrity constraints. The parser understands the FOREIGN KEY syntax, +but only prints a notice and otherwise ignores the clause. + Foreign keys may be partially emulated by triggers (See the CREATE TRIGGER + statement). + + + + + + 1998-09-11 + + + UNIQUE Constraint + + + +[ CONSTRAINT name ] UNIQUE ( column [, ...] ) + + + Inputs + + + + CONSTRAINT name @@ -451,10 +1053,10 @@ Outputs - +status @@ -470,254 +1072,63 @@ - + + - Description + +Description + + The UNIQUE constraint specifies a rule that a group of one or more distinct columns of a table may contain only unique values. +The behavior of the UNIQUE table constraint is the same as that for column +constraints, with the additional capability to span multiple columns. - The column definitions of the specified columns do not have to - include a NOT NULL constraint to be included in a UNIQUE - constraint. Having more than one null value in a column without a - NOT NULL constraint, does not violate a UNIQUE constraint. - - - Each UNIQUE constraint must name a set of columns that is - different from the set of columns named by any other UNIQUE or - PRIMARY KEY constraint defined for the Table. - - - - PostgreSQL automatically creates a unique index for each UNIQUE - constraint, to assure - data integrity. See CREATE INDEX for more information. - - - - - - - 1998-04-15 - - - CONSTRAINT clause - - - Table constraint definition - - - [ CONSTRAINT name ] - { PRIMARY KEY constraint | - UNIQUE constraint | - CHECK constraint } - - - Column constraint definition - - - [ CONSTRAINT name ] - { NOT NULL constraint | - PRIMARY KEY constraint | - UNIQUE constraint | - CHECK constraint } - - - - - - - - - - - - - - name - - - - - An arbitrary name given to an integrity constraint. - - - - - - - constraint - - - - - The definition of the constraint. - - - - - - - - - A Constraint is a named rule: a SQL object which helps define - valid sets of values by putting limits on the results of INSERT, - UPDATE or DELETE operations performed on a Base table. - - - There are two ways to define integrity constraints: - Table constraint and Column constraint. - - - A Table Constraint is an integrity Constraint defined on one or - more Columns of a Base table. The four variations of "Table - Constraint" are: - - PRIMARY KEY - FOREIGN KEY - UNIQUE - CHECK - - - - A column constraint is an integrity constraint defined as part - of a column definition, and logically becomes a table - constraint as soon as it is created. The column - constraints available are: - - PRIMARY KEY - REFERENCES - UNIQUE - CHECK - NOT NULL - - - - PostgreSQL does not yet (at release 6.3.2) support the FOREIGN KEY or - REFERENCES integrity constraints, although the parser will accept them. - Foreign keys may be partially emulated by triggers (See CREATE TRIGGER - statement) - - - - - PostgreSQL does not yet support either DOMAINs or ASSERTIONs. - - - - - - - - 1998-04-15 - - The CHECK constraint - - [ CONSTRAINT name ] CHECK ( condition [, ...] ) - - - Inputs - - - - - name - - - - An arbitrary name given to a constraint. - - - - - - condition - - - - Any valid conditional expression. - - - - - +See the section on the UNIQUE column constraint for more details. + + + +Usage + + + + Define a UNIQUE table constraint for the table distributors: + +CREATE TABLE distributors ( + did DECIMAL(03), + name VARCHAR(40), + UNIQUE(name) +); + + - - - 1998-04-15 - - - Outputs - - - - - - - ERROR: ExecAppend: rejected due to CHECK constraint - "table_column". - - - - - This error occurs at runtime if one tries to insert an illegal - value into a column subject to a CHECK constraint. - - - - - - - Description - - The CHECK constraint specifies a rule that a group of one or - more columns of a table may contain only those values allowed by - the rule. - The CHECK constraint is either a table constraint or a column - constraint. - - - PostgreSQL automatically creates an unique index to assure - data integrity (See CREATE INDEX statement). - The SQL92 CHECK column constraints can only be defined on, and - refer to, one column of the table. PostgreSQL does not have - this restriction. - - - - + + - 1998-04-15 + 1998-09-11 - PRIMARY KEY clause + PRIMARY KEY Constraint - - Table constraint definition - + [ CONSTRAINT name ] PRIMARY KEY ( column [, ...] ) - - Column constraint definition - - - [ CONSTRAINT name ] PRIMARY KEY - - Parameters + Inputs - name +CONSTRAINT name @@ -727,19 +1138,27 @@ - column +column [, ...] - The name of a column in the table. + The names of one or more columns in the table. + Outputs + + + +status + + + ERROR: Cannot insert a duplicate key into a unique index. @@ -750,42 +1169,31 @@ + + + + Description The PRIMARY KEY constraint specifies a rule that a group of one or more distinct columns of a table may contain only unique, - (not duplicates), non-null values. The column definitions of + (non duplicate), non-null values. The column definitions of the specified columns do not have to include a NOT NULL - constraint to be included in a PRIMARY KEY constraint. + constraint to be included in a PRIMARY KEY constraint. + +The PRIMARY KEY table constraint is similar to that for column constraints, +with the additional capability of encompassing multiple columns. - A table's set of valid values may be constrained by only one - PRIMARY KEY constraint at a time. - - - The PRIMARY KEY constraint must name a set of columns that is - different from the set of columns named by any UNIQUE constraint - defined for the same table. - +Refer to the section on the PRIMARY KEY column constraint for more +information. - - - 1998-04-15 - - - Notes - - - PostgreSQL automatically creates an unique index to assure - data integrity. (See CREATE INDEX statement) - - - + @@ -822,16 +1230,6 @@ ); - - Define two NOT NULL column constraints on the table distributors - - - CREATE TABLE distributors ( - did DECIMAL(3) CONSTRAINT no_null NOT NULL, - name VARCHAR(40) NOT NULL - ); - - Define a UNIQUE table constraint for the table films. UNIQUE table constraints can be defined on one or more @@ -849,26 +1247,6 @@ ); - - Defines a UNIQUE column constraint for the table distributors. - UNIQUE column constraints can only be defined on one column - of the table (the following two examples are equivalents). - - - CREATE TABLE distributors ( - did DECIMAL(03), - name VARCHAR(40) UNIQUE, - UNIQUE(name) - ); - - - - CREATE TABLE distributors ( - did DECIMAL(3), - name VARCHAR(40) UNIQUE - ); - - Define a CHECK column constraint. @@ -910,7 +1288,7 @@ Defines a PRIMARY KEY column constraint for table distributors. PRIMARY KEY column constraints can only be defined on one column - of the table (the following two examples are equivalents) + of the table (the following two examples are equivalent) CREATE TABLE distributors ( @@ -924,27 +1302,17 @@ name VARCHAR(40) ); - - To assign a sequence as the default for the column did, - and a literal to the column name - - - - CREATE TABLE distributors ( - did DECIMAL(3) DEFAULT NEXTVAL('serial'), - name VARCHAR(40) DEFAULT 'luso films' - ); - - 1998-04-15 + 1998-09-11 Notes - CREATE TABLE/INHERITS is a PostgreSQL language extension. + CREATE TABLE/INHERITS is a Postgres + language extension. @@ -955,17 +1323,16 @@ Compatibility - - 1998-04-15 + 1998-09-11 SQL92 - In addition to normal CREATE TABLE, SQL92 also defines a + In addition to the normal CREATE TABLE, SQL92 also defines a CREATE TEMPORARY TABLE statement: @@ -996,16 +1363,18 @@ ) ON COMMIT DELETE ROWS -Temporary tables are not currently available in Postgres. +Temporary tables are not currently available + in Postgres. - In the current release of Postgres (v6.4), to create a temporary + In the current release of Postgres + (v6.4), to create a temporary table you must create and drop the table by explicit commands. - 1998-04-15 + 1998-09-11 UNIQUE clause @@ -1034,7 +1403,7 @@ Temporary tables are not currently available in <productname>Postgres</productna <REFSECT3 ID="R3-SQL-NOTNULL-4"> <REFSECT3INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-11</DATE> </REFSECT3INFO> <TITLE> NOT NULL clause @@ -1059,7 +1428,7 @@ the column. Not our problem... <REFSECT3 ID="R3-SQL-DEFAULTCLAUSE-1"> <REFSECT3INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-11</DATE> </REFSECT3INFO> <TITLE> DEFAULT clause @@ -1079,15 +1448,21 @@ the column. Not our problem... <REFSECT3 ID="R3-SQL-CONSTRAINT-3"> <REFSECT3INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-11</DATE> </REFSECT3INFO> <TITLE> CONSTRAINT clause - SQL92 specifies some additional capabilities for CONSTRAINTs, + SQL92 specifies some additional capabilities for constraints, and also defines assertions and domain constraints. - + + + Postgres does not yet support +either domains or assertions. + + + An assertion is a special type of integrity constraint and share the same namespace as other constraints. @@ -1193,7 +1568,7 @@ the column. Not our problem... - 1998-04-15 + 1998-09-11 CHECK clause @@ -1257,7 +1632,7 @@ affect a column or a table. <REFSECT3 ID="R3-SQL-PRIMARYKEY-1"> <REFSECT3INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-11</DATE> </REFSECT3INFO> <TITLE> PRIMARY KEY clause diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml index b98c90aa21..891cf209fd 100644 --- a/doc/src/sgml/ref/create_trigger.sgml +++ b/doc/src/sgml/ref/create_trigger.sgml @@ -14,30 +14,24 @@ </REFPURPOSE> <REFSYNOPSISDIV> <REFSYNOPSISDIVINFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSYNOPSISDIVINFO> <SYNOPSIS> - CREATE TRIGGER <REPLACEABLE CLASS="PARAMETER">name</REPLACEABLE> { BEFORE | AFTER } - { <REPLACEABLE CLASS="PARAMETER">event</REPLACEABLE> [OR ...] } - ON <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> FOR EACH { ROW | STATEMENT } - EXECUTE PROCEDURE <REPLACEABLE CLASS="PARAMETER">funcname</REPLACEABLE> ( <REPLACEABLE CLASS="PARAMETER">arguments</REPLACEABLE> ) +CREATE TRIGGER <REPLACEABLE CLASS="PARAMETER">name</REPLACEABLE> { BEFORE | AFTER } + { <REPLACEABLE CLASS="PARAMETER">event</REPLACEABLE> [OR ...] } + ON <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> FOR EACH { ROW | STATEMENT } + EXECUTE PROCEDURE <REPLACEABLE CLASS="PARAMETER">funcname</REPLACEABLE> ( <REPLACEABLE CLASS="PARAMETER">arguments</REPLACEABLE> ) </SYNOPSIS> <REFSECT2 ID="R2-SQL-CREATETRIGGER-1"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT2INFO> <TITLE> Inputs - - - - - - @@ -80,14 +74,11 @@ - - - - 1998-04-15 + 1998-09-21 Outputs @@ -97,6 +88,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -120,23 +112,17 @@ <REFSECT1 ID="R1-SQL-CREATETRIGGER-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT1INFO> <TITLE> Description - CREATE TRIGGER will enter a new trigger into the current + CREATE TRIGGER will enter a new trigger into the current data base. The trigger will be associated with the relation relname and will execute the specified function funcname. - - Only the relation owner may create a trigger on this relation. - - - At release 6.3.2, STATEMENT triggers are not implemented. - The trigger can be specified to fire either before the operation is attempted on a tuple (before constraints @@ -147,24 +133,32 @@ skip the operation for the current tuple, or change the tuple being inserted (for INSERT and UPDATE operations only). If the trigger fires after the event, all changes, including the - last INSERTion, UPDATE or DELETion, are "visible" to the trigger. + last insertion, update, or deletion, are "visible" to the trigger. - Refer to the SPI and trigger programming guides for more + Refer to the chapters on SPI and Triggers in the +PostgreSQL Programmer's Guide for more information. - 1998-04-15 + 1998-09-21 Notes - CREATE TRIGGER statement is a PostgreSQL language extension. + CREATE TRIGGER is a Postgres + language extension. + + Only the relation owner may create a trigger on this relation. + + + As of the current release (v6.4), STATEMENT triggers are not implemented. + - Refer to the DROP TRIGGER statement for information on how to + Refer to DROP TRIGGER for information on how to remove triggers. @@ -179,18 +173,18 @@ table before appending or updating a row in the table films: - CREATE TRIGGER if_dist_exists - BEFORE INSERT OR UPDATE ON films FOR EACH ROW - EXECUTE PROCEDURE check_primary_key ('did', 'distributors', 'did'); +CREATE TRIGGER if_dist_exists + BEFORE INSERT OR UPDATE ON films FOR EACH ROW + EXECUTE PROCEDURE check_primary_key ('did', 'distributors', 'did'); Before cancelling a distributor or updating its code, remove every reference to the table films: - CREATE TRIGGER if_film_exists - BEFORE DELETE OR UPDATE ON distributors FOR EACH ROW - EXECUTE PROCEDURE check_foreign_key (1, 'CASCADE', 'did', 'films', 'did'); +CREATE TRIGGER if_film_exists + BEFORE DELETE OR UPDATE ON distributors FOR EACH ROW + EXECUTE PROCEDURE check_foreign_key (1, 'CASCADE', 'did', 'films', 'did'); @@ -203,29 +197,30 @@ - 1998-04-15 + 1998-09-21 SQL92 - There is no CREATE TRIGGER statement in SQL92. + There is no CREATE TRIGGER in SQL92. The second example above may also be done by using a FOREIGN KEY constraint as in: - CREATE TABLE distributors ( - did DECIMAL(3), - name VARCHAR(40), - CONSTRAINT if_film_exists FOREIGN KEY(did) REFERENCES films - ON UPDATE CASCADE ON DELETE CASCADE - ); +CREATE TABLE distributors ( + did DECIMAL(3), + name VARCHAR(40), + CONSTRAINT if_film_exists + FOREIGN KEY(did) REFERENCES films + ON UPDATE CASCADE ON DELETE CASCADE +); - However, foreign keys are not yet implemented at version 6.3.2 of - PostgreSQL. + However, foreign keys are not yet implemented (as of version 6.4) in + Postgres. diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml index bd20bd14ed..71858819cf 100644 --- a/doc/src/sgml/ref/create_type.sgml +++ b/doc/src/sgml/ref/create_type.sgml @@ -14,46 +14,39 @@ - 1998-04-15 + 1998-09-21 - CREATE TYPE typename ( - INTERNALLENGTH = (internallength | VARIABLE) - [, EXTERNALLENGTH = (externallength | VARIABLE) ] +CREATE TYPE typename ( Why are parentheses required around the length parameters? - , INPUT = input_function - , OUTPUT = output_function - [, ELEMENT = element] - [, DELIMITER = delimiter] - [, DEFAULT = "default" ] - [, SEND = send_function ] - [, RECEIVE = receive_function ] - [, PASSEDBYVALUE]) + INPUT = input_function + , OUTPUT = output_function + , INTERNALLENGTH = (internallength | VARIABLE) + [ , EXTERNALLENGTH = (externallength | VARIABLE) ] + [ , ELEMENT = element ] + [ , DELIMITER = delimiter ] + [ , DEFAULT = "default" ] + [ , SEND = send_function ] + [ , RECEIVE = receive_function ] + [ , PASSEDBYVALUE ] +) - 1998-04-15 + 1998-09-21 Inputs - - - - - - - typename - @@ -63,9 +56,7 @@ Why are parentheses required around the length parameters? - - internallength - +INTERNALLENGTH internallength @@ -76,9 +67,7 @@ Why are parentheses required around the length parameters? - - externallength - +EXTERNALLENGTH externallength @@ -89,9 +78,7 @@ Why are parentheses required around the length parameters? - - input_function - + INPUT input_function @@ -103,9 +90,7 @@ Why are parentheses required around the length parameters? - - output_function - + OUTPUT output_function @@ -117,9 +102,7 @@ Why are parentheses required around the length parameters? - element - @@ -130,9 +113,7 @@ Why are parentheses required around the length parameters? - delimiter - @@ -142,9 +123,7 @@ Why are parentheses required around the length parameters? - default @@ -155,9 +134,7 @@ Why are parentheses required around the length parameters? - send_function - @@ -170,9 +147,7 @@ Why are parentheses required around the length parameters? - receive_function - @@ -184,14 +159,11 @@ Why are parentheses required around the length parameters? - - - - 1998-04-15 + 1998-09-21 Outputs @@ -201,6 +173,7 @@ Why are parentheses required around the length parameters? <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -225,7 +198,7 @@ Why are parentheses required around the length parameters? <REFSECT1 ID="R1-SQL-CREATETYPE-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT1INFO> <TITLE> Description @@ -383,16 +356,19 @@ it with the fact that the data is not present></comment> </refsect2> <REFSECT2 ID="R2-SQL-CREATETYPE-3"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT2INFO> <TITLE> Notes - Refer to DROP TYPE statement to drop types. + Refer to DROP TYPE to remove an existing type. - See also CREATE FUNCTION, CREATE OPERATOR and large_objects. + See also CREATE FUNCTION, + CREATE OPERATOR and the chapter on Large Objects +in the PostgreSQL Programmer's Guide. + @@ -402,18 +378,16 @@ it with the fact that the data is not present> Compatibility - CREATE TYPE statement is a PostgreSQL language extension. - - 1998-04-15 + 1998-09-21 SQL3 - CREATE TYPE is a SQL3 statement. + CREATE TYPE is an SQL3 statement. diff --git a/doc/src/sgml/ref/create_user.sgml b/doc/src/sgml/ref/create_user.sgml index 14e6729890..3744d5ea3a 100644 --- a/doc/src/sgml/ref/create_user.sgml +++ b/doc/src/sgml/ref/create_user.sgml @@ -14,35 +14,25 @@ - 1998-04-15 + 1998-09-21 - - CREATE USER username - [WITH PASSWORD password] - [CREATEDB | NOCREATEDB] - [CREATEUSER | NOCREATEUSER] - [IN GROUP groupname [, ...] ] - [VALID UNTIL 'abstime'] - - +CREATE USER username + [ WITH PASSWORD password ] + [ CREATEDB | NOCREATEDB ] + [ CREATEUSER | NOCREATEUSER ] + [ IN GROUP groupname [, ...] ] + [ VALID UNTIL 'abstime' ] - 1998-04-15 + 1998-09-21 Inputs - - - - - - - @@ -63,8 +53,8 @@ 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 PostgreSQL that the - PostgreSQL user's password is initially set to NULL. + 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" @@ -72,7 +62,7 @@ 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 PostgreSQL instance, and the password + 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 @@ -105,7 +95,7 @@ These clauses determine whether a user will be permitted to create new - users in an instance of PostgreSQL. + users in an instance of Postgres. Omitting this clause will set the user's value of this attribute to be NOCREATEUSER. @@ -128,7 +118,7 @@ The VALID UNTIL clause sets an absolute time after which the - user's PostgreSQL login is no longer valid. Please note that + 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 @@ -140,14 +130,11 @@ - - - - 1998-04-15 + 1998-09-21 Outputs @@ -157,6 +144,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -192,19 +180,20 @@ this error message.</comment> <REFSECT1 ID="R1-SQL-CREATEUSER-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT1INFO> <TITLE> Description - CREATE USER will add a new user to an instance of PostgreSQL. + 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 - PostgreSQL users' usesysids will not + Postgres users' usesysids will not correspond to their operating system(OS) user ids. The exception to this rule is the 'postgres' user, whose OS user id @@ -213,19 +202,19 @@ this error message. If you still want the OS user id and the usesysid to match for any given user, - use the "createuser" script provided with the PostgreSQL + use the "createuser" script provided with the Postgres distribution. - 1998-04-15 + 1998-09-21 Notes - CREATE USER statement is a PostgreSQL language extension. + CREATE USER statement is a Postgres language extension. Use DROP USER or ALTER USER statements to remove or modify a user @@ -292,7 +281,7 @@ this error message. - 1998-04-15 + 1998-09-21 SQL92 diff --git a/doc/src/sgml/ref/create_view.sgml b/doc/src/sgml/ref/create_view.sgml index 99b7be5362..07c3d96639 100644 --- a/doc/src/sgml/ref/create_view.sgml +++ b/doc/src/sgml/ref/create_view.sgml @@ -14,28 +14,21 @@ Constructs a virtual table </REFPURPOSE> <REFSYNOPSISDIV> <REFSYNOPSISDIVINFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSYNOPSISDIVINFO> <SYNOPSIS> - CREATE VIEW <REPLACEABLE CLASS="PARAMETER">view</REPLACEABLE> - AS SELECT <REPLACEABLE CLASS="PARAMETER">query</REPLACEABLE> +CREATE VIEW <REPLACEABLE CLASS="PARAMETER">view</REPLACEABLE> + AS SELECT <REPLACEABLE CLASS="PARAMETER">query</REPLACEABLE> </SYNOPSIS> <REFSECT2 ID="R2-SQL-CREATEVIEW-1"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT2INFO> <TITLE> Inputs - - - - - - - @@ -62,14 +55,11 @@ An SQL query which will provide the columns and rows of the view. - - - - 1998-04-15 + 1998-09-21 Outputs @@ -79,6 +69,7 @@ An SQL query which will provide the columns and rows of the view. <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -133,7 +124,7 @@ An SQL query which will provide the columns and rows of the view. <REFSECT1 ID="R1-SQL-CREATEVIEW-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT1INFO> <TITLE> Description @@ -147,7 +138,7 @@ An SQL query which will provide the columns and rows of the view. <REFSECT2 ID="R2-SQL-CREATEVIEW-3"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT2INFO> <TITLE> Notes @@ -159,7 +150,7 @@ An SQL query which will provide the columns and rows of the view. <REFSECT2 ID="R2-SQL-CREATEVIEW-4"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT2INFO> <TITLE> Bugs @@ -177,17 +168,17 @@ An SQL query which will provide the columns and rows of the view. Create a view consisting of all Comedy films: </PARA> <ProgramListing> - CREATE VIEW kinds AS - SELECT * - FROM films - WHERE kind = 'Comedy'; +CREATE VIEW kinds AS + SELECT * + FROM films + WHERE kind = 'Comedy'; - SELECT * FROM kinds; +SELECT * FROM kinds; - code |title |did| date_prod|kind |len - -----+-------------------------+---+----------+----------+------ - UA502|Bananas |105|1971-07-13|Comedy | 01:22 - C_701|There's a Girl in my Soup|107|1970-06-11|Comedy | 01:36 +code |title |did| date_prod|kind |len +-----+-------------------------+---+----------+----------+------ +UA502|Bananas |105|1971-07-13|Comedy | 01:22 +C_701|There's a Girl in my Soup|107|1970-06-11|Comedy | 01:36 </ProgramListing> </REFSECT1> @@ -201,7 +192,7 @@ An SQL query which will provide the columns and rows of the view. <REFSECT2 ID="R2-SQL-CREATEVIEW-5"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-21</DATE> </REFSECT2INFO> <TITLE> SQL92 @@ -209,13 +200,13 @@ An SQL query which will provide the columns and rows of the view. <PARA> SQL92 specifies some additional capabilities for the CREATE VIEW statement: </PARA> - <programlisting> - CREATE VIEW <replaceable class="parameter">view</replaceable> [ <replaceable class="parameter">column</replaceable> [, ...] ] - AS SELECT <replaceable class="parameter">expression</replaceable> [AS <replaceable class="parameter">colname</replaceable>] [, ...] - FROM <replaceable class="parameter">table</replaceable> - [WHERE <replaceable class="parameter">condition</replaceable>] - [ WITH [ CASCADE | LOCAL ] CHECK OPTION ] - </programlisting> + <synopsis> +CREATE VIEW <replaceable class="parameter">view</replaceable> [ <replaceable class="parameter">column</replaceable> [, ...] ] + AS SELECT <replaceable class="parameter">expression</replaceable> [AS <replaceable class="parameter">colname</replaceable>] [, ...] + FROM <replaceable class="parameter">table</replaceable> + [ WHERE <replaceable class="parameter">condition</replaceable> ] + [ WITH [ CASCADE | LOCAL ] CHECK OPTION ] + </synopsis> <VARIABLELIST> <VARLISTENTRY> @@ -226,7 +217,7 @@ An SQL query which will provide the columns and rows of the view. <VARIABLELIST> <VARLISTENTRY> <TERM> - <ReturnValue>CHECK OPTION</ReturnValue> + CHECK OPTION </TERM> <LISTITEM> <PARA> This option is to do with updatable views. @@ -238,7 +229,7 @@ An SQL query which will provide the columns and rows of the view. </VARLISTENTRY> <VARLISTENTRY> <TERM> - <ReturnValue>LOCAL</ReturnValue> + LOCAL </TERM> <LISTITEM> <PARA> @@ -248,7 +239,7 @@ An SQL query which will provide the columns and rows of the view. </VARLISTENTRY> <VARLISTENTRY> <TERM> - <ReturnValue>CASCADE</ReturnValue> + CASCADE </TERM> <LISTITEM> <PARA> diff --git a/doc/src/sgml/ref/declare.sgml b/doc/src/sgml/ref/declare.sgml index b9b2f4087a..b941815b50 100644 --- a/doc/src/sgml/ref/declare.sgml +++ b/doc/src/sgml/ref/declare.sgml @@ -259,6 +259,16 @@ and expect data to come back in a text format. <productname>Postgres</productname> does not have an explicit <command>OPEN cursor</command> statement; a cursor is considered to be open when it is declared. + +<note> +<para> +In <acronym>SQL92</acronym> cursors are only available in +embedded applications. <application>ecpg</application>, the +embedded SQL preprocessor for <productname>Postgres</productname>, +supports the <acronym>SQL92</acronym> conventions, including those +involving DECLARE and OPEN statements. +</note> + </PARA> </REFSECT2> </refsect1> @@ -271,8 +281,8 @@ and expect data to come back in a text format. To declare a cursor: </PARA> <ProgramListing> - DECLARE liahona CURSOR - FOR SELECT * FROM films; +DECLARE liahona CURSOR + FOR SELECT * FROM films; </ProgramListing> </REFSECT1> diff --git a/doc/src/sgml/ref/delete.sgml b/doc/src/sgml/ref/delete.sgml index 9e28501109..36c85dcba4 100644 --- a/doc/src/sgml/ref/delete.sgml +++ b/doc/src/sgml/ref/delete.sgml @@ -31,16 +31,10 @@ - - - - - - - table + table @@ -50,7 +44,7 @@ - condition + condition @@ -64,9 +58,6 @@ - - - @@ -81,6 +72,7 @@ +status @@ -97,7 +89,7 @@ If count is 0, - no rows are deleted. + no rows were deleted. @@ -139,26 +131,27 @@ Remove all films but musicals: - DELETE FROM films WHERE kind <> 'Musical'; +DELETE FROM films WHERE kind <> 'Musical'; - SELECT * FROM films; +SELECT * FROM films; - code |title |did| date_prod|kind |len - -----+-------------------------+---+----------+----------+------ - UA501|West Side Story |105|1961-01-03|Musical | 02:32 - TC901|The King and I |109|1956-08-11|Musical | 02:13 - WD101|Bed Knobs and Broomsticks|111| |Musical | 01:57 +code |title |did| date_prod|kind |len +-----+-------------------------+---+----------+----------+------ +UA501|West Side Story |105|1961-01-03|Musical | 02:32 +TC901|The King and I |109|1956-08-11|Musical | 02:13 +WD101|Bed Knobs and Broomsticks|111| |Musical | 01:57 +(3 rows) - Clear the table films: + Clear the table films: - DELETE FROM films; +DELETE FROM films; - SELECT * FROM films; - code|title|did|date_prod|kind|len - ----+-----+---+---------+----+--- - (0 rows) +SELECT * FROM films; +code|title|did|date_prod|kind|len +----+-----+---+---------+----+--- +(0 rows) @@ -177,14 +170,15 @@ SQL92 - SQL92 defines a different syntax for a positioned DELETE statement: + SQL92 allows a positioned DELETE statement: - DELETE FROM table WHERE CURRENT OF cursor +DELETE FROM table WHERE CURRENT OF cursor - where cursor identifies an open cursor. + where cursor identifies an open cursor. Interactive cursors in Postgres are read-only. + diff --git a/doc/src/sgml/ref/drop_aggregate.sgml b/doc/src/sgml/ref/drop_aggregate.sgml index 6bf9fe2c9d..b4cdd0a408 100644 --- a/doc/src/sgml/ref/drop_aggregate.sgml +++ b/doc/src/sgml/ref/drop_aggregate.sgml @@ -17,7 +17,7 @@ 1998-04-15 - DROP AGGREGATE name type +DROP AGGREGATE name type @@ -29,16 +29,10 @@ - - - - - - - name + name @@ -48,12 +42,12 @@ - type + type The type of an existing aggregate function. - (Refer to PostgreSQL User's Guide chapter 4 for + (Refer to the PostgreSQL User's Guide for further information about data types). This should become a cross-reference rather than a hard-coded chapter number @@ -61,9 +55,6 @@ - - - @@ -78,6 +69,7 @@ +status @@ -94,7 +86,7 @@ - WARN RemoveAggregate: aggregate 'name' for 'type' does not exist + WARN RemoveAggregate: aggregate 'name' for 'type' does not exist @@ -131,7 +123,8 @@ Notes - The DROP AGGREGATE statement is a PostgreSQL + The DROP AGGREGATE statement is a +Postgres language extension. @@ -150,7 +143,7 @@ int4: - DROP AGGREGATE myavg int4; +DROP AGGREGATE myavg int4; @@ -169,7 +162,7 @@ SQL92 - There is no DROP AGGREGATE statement in SQL92. + There is no DROP AGGREGATE statement in SQL92. diff --git a/doc/src/sgml/ref/drop_database.sgml b/doc/src/sgml/ref/drop_database.sgml index d99d7d43e8..5fe7b48ad5 100644 --- a/doc/src/sgml/ref/drop_database.sgml +++ b/doc/src/sgml/ref/drop_database.sgml @@ -17,7 +17,7 @@ 1998-04-15 - DROP DATABASE name +DROP DATABASE name @@ -29,12 +29,6 @@ - - - - - - @@ -47,9 +41,6 @@ - - - @@ -64,6 +55,7 @@ +status @@ -88,6 +80,16 @@ + + + ERROR: destroydb cannot be executed on an open database + + + + This message occurs if the specified database does not exist. + + + @@ -116,17 +118,19 @@ Notes - - - - This query should NOT be executed interactively. - The destroydb script should be used instead. - - - Some explanation would be desirable here! - + - DROP DATABASE statement is a PostgreSQL language extension. + DROP DATABASE statement is a Postgres + language extension. + + + + This query cannot be executed while connected to the target +database. It is usually preferable to use the + destroydb script instead. + + + Refer to the CREATE DATABASE statement for @@ -150,7 +154,7 @@ SQL92 - There is no DROP DATABASE statement in SQL92. + There is no DROP DATABASE in SQL92. diff --git a/doc/src/sgml/ref/drop_function.sgml b/doc/src/sgml/ref/drop_function.sgml index 3cb7980327..54f2b42d56 100644 --- a/doc/src/sgml/ref/drop_function.sgml +++ b/doc/src/sgml/ref/drop_function.sgml @@ -18,7 +18,7 @@ 1998-04-15 - DROP FUNCTION name ( [type [, ...]] ) +DROP FUNCTION name ( [ type [, ...] ] ) @@ -30,12 +30,6 @@ - - - - - - @@ -58,9 +52,6 @@ - - - @@ -75,6 +66,7 @@ +status @@ -91,13 +83,12 @@ - - WARN RemoveFunction: Function "name" ("types") does not exist + WARN RemoveFunction: Function "name" ("types") does not exist This message is given if the function specified does not -exist into database. +exist in the current database. @@ -131,11 +122,12 @@ exist into database. Notes - Refer to the - - CREATE FUNCTION + Refer to + +CREATE FUNCTION + - statement to create aggregate functions. + to create aggregate functions. @@ -147,7 +139,7 @@ exist into database. This command removes the square root function: - DROP FUNCTION sqrt(int4); +DROP FUNCTION sqrt(int4); @@ -164,8 +156,8 @@ exist into database. Compatibility - DROP FUNCTION statement is a PostgreSQL language extension. + +DROP FUNCTION is a Postgres language extension. @@ -176,9 +168,10 @@ exist into database. SQL/PSM - The SQL/PSM DROP FUNCTION statement has the following syntax: +SQL/PSM is a proposed standard to enable function extensibility. +The SQL/PSM DROP FUNCTION statement has the following syntax: - DROP [ SPECIFIC ] FUNCTION name { RESTRICT | CASCADE } +DROP [ SPECIFIC ] FUNCTION name { RESTRICT | CASCADE } diff --git a/doc/src/sgml/ref/drop_index.sgml b/doc/src/sgml/ref/drop_index.sgml index 39ebe9f5d4..05559b5761 100644 --- a/doc/src/sgml/ref/drop_index.sgml +++ b/doc/src/sgml/ref/drop_index.sgml @@ -17,7 +17,7 @@ 1998-04-15 - DROP INDEX index_name +DROP INDEX index_name @@ -29,12 +29,6 @@ - - - - - - @@ -47,9 +41,6 @@ - - - @@ -64,6 +55,7 @@ +status @@ -84,7 +76,7 @@ - This message occurs if "index_name" + This message occurs if index_name is not an index in the database. @@ -117,11 +109,12 @@ Notes - DROP INDEX is a PostgreSQL language extension. + DROP INDEX is a Postgres + language extension. Refer to the CREATE INDEX statement for - information on how to create indices. + information on how to create indexes. @@ -133,7 +126,7 @@ This command will remove the title_idx index: - DROP INDEX title_idx; +DROP INDEX title_idx; @@ -152,9 +145,11 @@ SQL92 -SQL92 defines commands by which to access a generic relational database. -Indices are an implementation-dependent feature and hence -there is no DROP INDEX statement in SQL92. +SQL92 defines commands by which to access + a generic relational database. +Indexes are an implementation-dependent feature and hence +there are no index-specific commands or definitions in the +SQL92 language. diff --git a/doc/src/sgml/ref/drop_language.sgml b/doc/src/sgml/ref/drop_language.sgml index 60a4376025..78a2db5f3b 100644 --- a/doc/src/sgml/ref/drop_language.sgml +++ b/doc/src/sgml/ref/drop_language.sgml @@ -17,7 +17,7 @@ 1998-04-15 - DROP PROCEDURAL LANGUAGE 'langname' +DROP PROCEDURAL LANGUAGE 'langname' @@ -29,16 +29,10 @@ - - - - - - - langname + langname @@ -47,9 +41,6 @@ - - - @@ -64,6 +55,7 @@ +status @@ -107,7 +99,7 @@ DROP PROCEDURAL LANGUAGE will remove the definition - of the previously registered procedural language with the name + of the previously registered procedural language having the name 'langname'. @@ -120,10 +112,10 @@ The DROP PROCEDURAL LANGUAGE statement is - a PostgreSQL language extension. + a Postgres language extension. - Refer to the CREATE PROCEDURAL LANGUAGE statement + Refer to CREATE PROCEDURAL LANGUAGE for information on how to create procedural languages. @@ -153,7 +145,7 @@ This command removes the PL/Sample language: - DROP PROCEDURAL LANGUAGE 'plsample' +DROP PROCEDURAL LANGUAGE 'plsample' @@ -172,7 +164,8 @@ SQL92 - There is no DROP PROCEDURAL LANGUAGE statement in SQL92. + There is no DROP PROCEDURAL LANGUAGE in +SQL92. diff --git a/doc/src/sgml/ref/drop_operator.sgml b/doc/src/sgml/ref/drop_operator.sgml index 4aa87863bf..48e3e60d02 100644 --- a/doc/src/sgml/ref/drop_operator.sgml +++ b/doc/src/sgml/ref/drop_operator.sgml @@ -16,31 +16,25 @@ - 1998-04-15 + 1998-09-22 - DROP OPERATOR id ( type | NONE [,...] ); +DROP OPERATOR id ( type | NONE [,...] ) - 1998-04-15 + 1998-09-22 Inputs - - - - - - - id + id @@ -50,7 +44,7 @@ - type + type @@ -59,14 +53,11 @@ - - - - 1998-04-15 + 1998-09-22 Outputs @@ -76,6 +67,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -92,11 +84,33 @@ </VARLISTENTRY> <VARLISTENTRY> <TERM> - <ReturnValue>ERROR: RemoveOperator: ... does not exist</ReturnValue> + <ReturnValue>ERROR: RemoveOperator: binary operator '<REPLACEABLE CLASS="PARAMETER">id</REPLACEABLE>' taking '<REPLACEABLE CLASS="PARAMETER">type1</REPLACEABLE>' and '<REPLACEABLE CLASS="PARAMETER">type2</REPLACEABLE>' does not exist</ReturnValue> </TERM> <LISTITEM> <PARA> - This message occurs if the operator specified doesn't exist. + This message occurs if the specified binary operator does not exist. + </PARA> + </LISTITEM> + </VARLISTENTRY> + <VARLISTENTRY> + <TERM> + <ReturnValue>ERROR: RemoveOperator: left unary operator '<REPLACEABLE CLASS="PARAMETER">id</REPLACEABLE>' taking '<REPLACEABLE CLASS="PARAMETER">type</REPLACEABLE>' does not exist</ReturnValue> + </TERM> + <LISTITEM> + <PARA> + This message occurs if the specified left unary operator + specified does not exist. + </PARA> + </LISTITEM> + </VARLISTENTRY> + <VARLISTENTRY> + <TERM> + <ReturnValue>ERROR: RemoveOperator: right unary operator '<REPLACEABLE CLASS="PARAMETER">id</REPLACEABLE>' taking '<REPLACEABLE CLASS="PARAMETER">type</REPLACEABLE>' does not exist</ReturnValue> + </TERM> + <LISTITEM> + <PARA> + This message occurs if the specified right unary operator + specified does not exist. </PARA> </LISTITEM> </VARLISTENTRY> @@ -109,7 +123,7 @@ <REFSECT1 ID="R1-SQL-DROPOPERATOR-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description @@ -126,22 +140,23 @@ <REFSECT2 ID="R2-SQL-DROPOPERATOR-3"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> Notes - The DROP OPERATOR statement is a PostgreSQL + The DROP OPERATOR statement is a +Postgres language extension. - Refer to the CREATE OPERATOR statement for + Refer to CREATE OPERATOR for information on how to create operators. - It is the user's responsibility to remove any access methods, - operator classes, and so on, that rely on the deleted operator. + It is the user's responsibility to remove any access methods and + operator classes that rely on the deleted operator. @@ -153,20 +168,20 @@ Remove power operator a^n for int4: - DROP OPERATOR ^ (int4, int4); +DROP OPERATOR ^ (int4, int4); Remove left unary operator !a for booleans: - DROP OPERATOR ! (none, bool); +DROP OPERATOR ! (none, bool); Remove right unary factorial operator a! for int4: - DROP OPERATOR ! (int4, none); +DROP OPERATOR ! (int4, none); @@ -179,13 +194,13 @@ - 1998-04-15 + 1998-09-22 SQL92 - There is no DROP OPERATOR statement in SQL92. + There is no DROP OPERATOR in SQL92. diff --git a/doc/src/sgml/ref/drop_rule.sgml b/doc/src/sgml/ref/drop_rule.sgml index fce6095f18..6b543b4d35 100644 --- a/doc/src/sgml/ref/drop_rule.sgml +++ b/doc/src/sgml/ref/drop_rule.sgml @@ -14,31 +14,25 @@ - 1998-04-15 + 1998-09-22 - DROP RULE name +DROP RULE name - 1998-04-15 + 1998-09-22 Inputs - - - - - - - name + name @@ -47,14 +41,11 @@ - - - - 1998-04-15 + 1998-09-22 Outputs @@ -64,6 +55,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -97,37 +89,40 @@ <REFSECT1 ID="R1-SQL-DROPRULE-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description - DROP RULE drops a rule from the specified PostgreSQL rule - system. PostgreSQL will immediately cease enforcing it and + DROP RULE drops a rule from the specified + Postgres rule + system. Postgres + will immediately cease enforcing it and will purge its definition from the system catalogs. - 1998-04-15 + 1998-09-22 Notes - The DROP RULE statement is a PostgreSQL + The DROP RULE statement is a + Postgres language extension. - Refer to the CREATE RULE statement for + Refer to CREATE RULE for information on how to create rules. - 1998-04-15 + 1998-09-22 Bugs @@ -160,13 +155,13 @@ <REFSECT2 ID="R2-SQL-DROPRULE-5"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> SQL92 - There is no DROP RULE statement in SQL92. + There is no DROP RULE in SQL92. diff --git a/doc/src/sgml/ref/drop_sequence.sgml b/doc/src/sgml/ref/drop_sequence.sgml index f60a1159c6..8288ff08d3 100644 --- a/doc/src/sgml/ref/drop_sequence.sgml +++ b/doc/src/sgml/ref/drop_sequence.sgml @@ -14,31 +14,25 @@ - 1998-04-15 + 1998-09-22 - DROP SEQUENCE seqname [, ...] +DROP SEQUENCE seqname [, ...] - 1998-04-15 + 1998-09-22 Inputs - - - - - - - seqname + seqname @@ -47,14 +41,11 @@ - - - - 1998-04-15 + 1998-09-22 Outputs @@ -64,6 +55,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -84,7 +76,7 @@ </TERM> <LISTITEM> <PARA> - This message occurs if the sequence specified does not exist. + This message occurs if the specified sequence does not exist. </PARA> </LISTITEM> </VARLISTENTRY> @@ -97,7 +89,7 @@ <REFSECT1 ID="R1-SQL-DROPSEQUENCE-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description @@ -111,13 +103,14 @@ <REFSECT2 ID="R2-SQL-DROPSEQUENCE-3"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> Notes - The DROP SEQUENCE statement is a PostgreSQL + The DROP SEQUENCE statement is a + Postgres language extension. @@ -134,7 +127,7 @@ To remove sequence serial from database: - DROP SEQUENCE serial +DROP SEQUENCE serial @@ -147,13 +140,13 @@ - 1998-04-15 + 1998-09-22 SQL92 - There is no DROP SEQUENCE statement in SQL92. + There is no DROP SEQUENCE in SQL92. diff --git a/doc/src/sgml/ref/drop_table.sgml b/doc/src/sgml/ref/drop_table.sgml index d913d74091..d8fb78f5f0 100644 --- a/doc/src/sgml/ref/drop_table.sgml +++ b/doc/src/sgml/ref/drop_table.sgml @@ -15,27 +15,21 @@ - 1998-04-15 + 1998-09-22 - DROP TABLE table [, ...] +DROP TABLE table [, ...] - 1998-04-15 + 1998-09-22 Inputs - - - - - - @@ -48,14 +42,11 @@ - - - - 1998-04-15 + 1998-09-22 Outputs @@ -65,6 +56,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -85,7 +77,7 @@ </TERM> <LISTITEM> <PARA> - If table/view specified doesn't exist into database. + If the specified table or view does not exist in the database. </PARA> </LISTITEM> </VARLISTENTRY> @@ -98,32 +90,32 @@ <REFSECT1 ID="R1-SQL-DROPTABLE-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description - - DROP TABLE removes tables and views from the database. + +DROP TABLE removes tables and views from the database. Only its owner may destroy a table or view. A table - may be emptied of rows, but not destroyed, by using DELETE. + may be emptied of rows, but not destroyed, by using DELETE. - If a table being destroyed has secondary indices on it, + If a table being destroyed has secondary indexes on it, they will be removed first. The removal of just a - secondary index will not affect the indexed table. + secondary index will not affect the contents of the underlying table. - 1998-04-15 + 1998-09-22 Notes - Refer to the CREATE TABLE and - ALTER TABLE statements for information on + Refer to CREATE TABLE and + ALTER TABLE for information on how to create or modify tables. @@ -138,7 +130,7 @@ distributors tables: - DROP TABLE films, distributors +DROP TABLE films, distributors @@ -151,7 +143,7 @@ - 1998-04-15 + 1998-09-22 SQL92 @@ -160,7 +152,7 @@ SQL92 specifies some additional capabilities for DROP TABLE: </PARA> <synopsis> - DROP TABLE <replaceable class="parameter">table</replaceable> { RESTRICT | CASCADE } +DROP TABLE <replaceable class="parameter">table</replaceable> { RESTRICT | CASCADE } </synopsis> <variablelist> <varlistentry> @@ -185,7 +177,7 @@ <tip> <para> At present, to remove a referenced view you must drop - it by hand. + it explicitly. </para> </tip> </refsect2> diff --git a/doc/src/sgml/ref/drop_trigger.sgml b/doc/src/sgml/ref/drop_trigger.sgml index bc0c5924ed..c4319a35f4 100644 --- a/doc/src/sgml/ref/drop_trigger.sgml +++ b/doc/src/sgml/ref/drop_trigger.sgml @@ -14,31 +14,25 @@ </REFPURPOSE> <REFSYNOPSISDIV> <REFSYNOPSISDIVINFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSYNOPSISDIVINFO> <SYNOPSIS> - DROP TRIGGER <REPLACEABLE CLASS="PARAMETER">name</REPLACEABLE> ON <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> +DROP TRIGGER <REPLACEABLE CLASS="PARAMETER">name</REPLACEABLE> ON <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> </SYNOPSIS> <REFSECT2 ID="R2-SQL-DROPTRIGGER-1"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> Inputs - - - - - - - name + name @@ -48,7 +42,7 @@ - table + table @@ -57,14 +51,11 @@ - - - - 1998-04-15 + 1998-09-22 Outputs @@ -74,6 +65,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -108,7 +100,7 @@ <REFSECT1 ID="R1-SQL-DROPTRIGGER-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description @@ -121,17 +113,17 @@ <REFSECT2 ID="R2-SQL-DROPTRIGGER-3"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> Notes - The DROP TRIGGER statement is a PostgreSQL + DROP TRIGGER is a Postgres language extension. - Refer to the CREATE TRIGGER statement for + Refer to CREATE TRIGGER for information on how to create triggers. @@ -141,10 +133,11 @@ Usage - Destroy the if_dist_exists trigger on table films: + Destroy the if_dist_exists trigger + on table films: - DROP TRIGGER if_dist_exists ON films; +DROP TRIGGER if_dist_exists ON films; @@ -157,13 +150,14 @@ - 1998-04-15 + 1998-09-22 SQL92 - There is no DROP TRIGGER statement in SQL92. + There is no DROP TRIGGER statement in + SQL92. diff --git a/doc/src/sgml/ref/drop_type.sgml b/doc/src/sgml/ref/drop_type.sgml index 4f900e5b11..d3a25b0309 100644 --- a/doc/src/sgml/ref/drop_type.sgml +++ b/doc/src/sgml/ref/drop_type.sgml @@ -14,31 +14,25 @@ - 1998-04-15 + 1998-09-22 - DROP TYPE typename +DROP TYPE typename - 1998-04-15 + 1998-09-22 Inputs - - - - - - - typename + typename @@ -47,14 +41,11 @@ - - - - 1998-04-15 + 1998-09-22 Outputs @@ -64,6 +55,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -97,7 +89,7 @@ <REFSECT1 ID="R1-SQL-DROPTYPE-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description @@ -112,28 +104,29 @@ <REFSECT2 ID="R2-SQL-DROPTYPE-3"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> Notes - DROP TYPE statement is a PostgreSQL language extension. + DROP TYPE statement is a Postgres + language extension. - Refer to the CREATE TYPE statement for + Refer to CREATE TYPE for inforamation on how to create types. It is the user's responsibility to remove any operators, - functions, aggregates, access methods, subtypes, classes, - and so on, that use a deleted type. + functions, aggregates, access methods, subtypes, and classes + that use a deleted type. - 1998-04-15 + 1998-09-22 Bugs @@ -152,7 +145,7 @@ To remove the <literal>box</literal> type: </PARA> <ProgramListing> - DROP TYPE box +DROP TYPE box </ProgramListing> </REFSECT1> @@ -165,13 +158,13 @@ <REFSECT2 ID="R2-SQL-DROPTYPE-5"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> SQL3 - DROP TYPE is a SQL3 statement. + DROP TYPE is a SQL3 statement. diff --git a/doc/src/sgml/ref/drop_user.sgml b/doc/src/sgml/ref/drop_user.sgml index f0dce27293..1ab89c284b 100644 --- a/doc/src/sgml/ref/drop_user.sgml +++ b/doc/src/sgml/ref/drop_user.sgml @@ -15,31 +15,25 @@ - 1998-04-15 + 1998-09-22 - DROP USER username +DROP USER username - 1998-04-15 + 1998-09-22 Inputs - - - - - - - username + username @@ -48,14 +42,11 @@ - - - - 1998-04-15 + 1998-09-22 Outputs @@ -65,6 +56,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -98,35 +90,35 @@ <REFSECT1 ID="R1-SQL-DROPUSER-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description - The DROP USER statement removes the named + DROP USER removes the specified user from the database, along with any databases owned by the user. It does not remove tables, views, or triggers owned by the named user in databases not owned by the user. This statement - can be used in the place of the destroyuser + can be used in place of the destroyuser script, regardless of how the user was created. - 1998-04-15 + 1998-09-22 Notes - The DROP USER statement is a PostgreSQL + DROP USER is a Postgres language extension. - Refer to the CREATE USER and - ALTER USER statements for information on + Refer to CREATE USER and + ALTER USER for information on how to create or modify user accounts. @@ -139,7 +131,7 @@ To drop a user account: - DROP USER Jonathan; +DROP USER Jonathan; @@ -152,13 +144,13 @@ - 1998-04-15 + 1998-09-22 SQL92 - There is no DROP USER statement in SQL92. + There is no DROP USER in SQL92. diff --git a/doc/src/sgml/ref/drop_view.sgml b/doc/src/sgml/ref/drop_view.sgml index 9be7a94610..90a7bf98a6 100644 --- a/doc/src/sgml/ref/drop_view.sgml +++ b/doc/src/sgml/ref/drop_view.sgml @@ -14,47 +14,38 @@ - 1998-04-15 + 1998-09-22 - DROP VIEW view +DROP VIEW view - 1998-04-15 + 1998-09-22 Inputs - - - - - - - view + view - The name of an existing view to drop. + The name of an existing view. - - - - 1998-04-15 + 1998-09-22 Outputs @@ -64,6 +55,7 @@ <VARIABLELIST> <VARLISTENTRY> <TERM> +<replaceable>status</replaceable> </TERM> <LISTITEM> <PARA> @@ -99,7 +91,7 @@ <REFSECT1 ID="R1-SQL-DROPVIEW-1"> <REFSECT1INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT1INFO> <TITLE> Description @@ -112,16 +104,18 @@ <REFSECT2 ID="R2-SQL-DROPVIEW-3"> <REFSECT2INFO> - <DATE>1998-04-15</DATE> + <DATE>1998-09-22</DATE> </REFSECT2INFO> <TITLE> Notes - The PostgreSQL DROP TABLE statement also drops views. + The Postgres + DROP TABLE statement also drops views. - Refer to the CREATE VIEW statement for information on how to create views. + Refer to CREATE VIEW + for information on how to create views. @@ -133,7 +127,7 @@ This command will remove the view called kinds: - DROP VIEW kinds +DROP VIEW kinds; @@ -146,19 +140,28 @@ - 1998-04-15 + 1998-09-22 SQL92 - SQL92 specifies some additional capabilities for + SQL92 specifies some additional capabilities for DROP VIEW: - DROP VIEW view {RESTRICT | CASCADE} +DROP VIEW view { RESTRICT | CASCADE } + + + + 1998-09-22 + + + Inputs + + RESTRICT @@ -179,10 +182,21 @@ + + + + + 1998-09-22 + + + Notes + + - At present, to remove a referenced view from a PostgreSQL database, - you must drop it by hand. + At present, to remove a referenced view from a + Postgres database, + you must drop it explicitly.