SET WITHOUT OIDS
- Backward compatibility syntax for removing the oid
- system column. As oid system columns cannot be added anymore, this never
- has an effect.
+ Backward-compatible syntax for removing the oid
+ system column. As oid system columns cannot be
+ added anymore, this never has an effect.
This form links the table to a composite type as though CREATE
TABLE OF had formed it. The table's list of column names and types
- must precisely match that of the composite type; the presence of
- an oid system column is permitted to differ. The table must
+ must precisely match that of the composite type. The table must
not inherit from any other table. These restrictions ensure
that CREATE TABLE OF would permit an equivalent table
definition.
the column contents and the old type is either binary coercible to the new
type or an unconstrained domain over the new type, a table rewrite is not
needed; but any indexes on the affected columns must still be rebuilt.
- Adding or removing a system oid column also requires
- rewriting the entire table. Table and/or index rebuilds may take a
+ Table and/or index rebuilds may take a
significant amount of time for a large table; and will temporarily require
as much as double the disk space.
column. Thus, dropping a column is quick but it will not immediately
reduce the on-disk size of your table, as the space occupied
by the dropped column is not reclaimed. The space will be
- reclaimed over time as existing rows are updated. (These statements do
- not apply when dropping the system oid column; that is done
- with an immediate rewrite.)
+ reclaimed over time as existing rows are updated.