2000-03-25
-CREATE [ TEMPORARY | TEMP ] TABLE table (
+CREATE [ TEMPORARY | TEMP ] TABLE table
+ [ UNDER inherited_table [, ...] ]
+ (
column type
[ NULL | NOT NULL ] [ UNIQUE ] [ DEFAULT value ]
[column_constraint_clause | PRIMARY KEY } [ ... ] ]
[, PRIMARY KEY ( column [, ...] ) ]
[, CHECK ( condition ) ]
[, table_constraint_clause ]
- ) [ UNDER inherited_table [, ...] ]
+ )
table
- The name of a new class or table to be created.
+ The name of the new table to be created.
- CREATE TABLE will enter a new class or table
+ CREATE TABLE will enter a new table
into the current data base. The table will be "owned" by the user issuing the
command.
The optional UNDER
- clause specifies a collection of class names from which this class
+ clause specifies a collection of table names from which this table
automatically inherits all fields. If any inherited field name
appears more than once, Postgres reports an error. Postgres automatically
- allows the created class to inherit functions on classes above it in
+ allows the created table to inherit functions on tables above it in
the inheritance hierarchy. Inheritance of functions is done according
to the conventions of the Common Lisp Object System (CLOS).
- Each new table or class table
- is automatically created as a type. Therefore, one or more instances
- from the class are automatically a type and can be used in
+ Each new table table
+ is automatically created as a type. Therefore, one or more rows
+ from the table are automatically a type and can be used in
or other CREATE TABLE statements.
-
-
- Notes
-
- CREATE TABLE/UNDER is defined by SQL3. Multiple inheritance is a
-
Postgres language extension.
-
-
-