+ endterm="sql-createindex-title">. The only storage parameter currently
+ available for tables is:
+
+
+
+
+
+ FILLFACTOR>
+
+ The fillfactor for a table is a percentage between 10 and 100.
+ 100 (complete packing) is the default. When a smaller fillfactor
+ is specified, INSERT> operations pack table pages only
+ to the indicated percentage; the remaining space on each page is
+ reserved for updating rows on that page. This gives UPDATE>
+ a chance to place the updated copy of a row on the same page as the
+ original, which is more efficient than placing it on a different page.
+ For a table whose entries are never updated, complete packing is the
+ best choice, but in heavily updated tables smaller fillfactors are
+ appropriate.
+
+
+
+
+
+
+
- The use of WITHOUT OIDS is not recommended
+ The use of OIDS=FALSE is not recommended
for tables with no primary key, since without either an OID or a
unique data key, it is difficult to identify specific rows.
inheritance and unique constraints rather dysfunctional.
- A table cannot have more than 1600 columns. (In practice, the
- effective limit is lower because of tuple-length constraints.)
-
+ A table cannot have more than 1600 columns. (In practice, the
+ effective limit is usually lower because of tuple-length constraints.)
+
Define a primary key table constraint for the table
- films>. Primary key table constraints can be defined
- on one or more columns of the table.
+ films>:
CREATE TABLE films (
Define a primary key constraint for table
distributors>. The following two examples are
equivalent, the first using the table constraint syntax, the second
- the column constraint syntax.
+ the column constraint syntax:
CREATE TABLE distributors (
- This assigns a literal constant default value for the column
- name, arranges for the default value of column
+ Assign a literal constant default value for the column
+ name, arrange for the default value of column
did to be generated by selecting the next value
- of a sequence object, and makes the default value of
+ of a sequence object, and make the default value of
modtime be the time at which the row is
- inserted.
+ inserted:
CREATE TABLE distributors (
);
- The above is equivalent to the following specified as a table constraint:
+ The same, specified as a table constraint:
CREATE TABLE distributors (
+ Create the same table, specifying 70% fill factor for both the table
+ and its unique index:
+
+CREATE TABLE distributors (
+ did integer,
+ name varchar(40),
+ UNIQUE(name) WITH (fillfactor=70)
+)
+WITH (fillfactor=70);
+
+
+
Create table cinemas> in tablespace diskvol1>:
-
-
Object IDs
-
- The
PostgreSQL concept of OIDs is not
- standard.
-
-
-
Zero-column tables
+
+
WITH> clause
+
+ The
WITH> clause is a PostgreSQL
+ extension; neither storage parameters nor OIDs are in the standard.
+
+
+
Tablespaces