|PostgreSQL 8.3.23 Documentation|
|Prev||Fast Backward||Chapter 54. BKI Backend Interface||Fast Forward||Next|
Create a table named tablename, and having the OID tableoid, with the columns given in parentheses.
The following column types are supported directly by bootstrap.c: bool, bytea, char (1 byte), name, int2, int4, regproc, regclass, regtype, text, oid, tid, xid, cid, int2vector, oidvector, _int4 (array), _text (array), _oid (array), _char (array), _aclitem (array). Although it is possible to create tables containing columns of other types, this cannot be done until after pg_type has been created and filled with appropriate entries. (That effectively means that only these column types can be used in bootstrapped tables, but non-bootstrap catalogs can contain any built-in type.)
When bootstrap is specified, the table will only be created on disk; nothing is entered into pg_class, pg_attribute, etc, for it. Thus the table will not be accessible by ordinary SQL operations until such entries are made the hard way (with insert commands). This option is used for creating pg_class etc themselves.
The table is created as shared if shared_relation is specified. It will have OIDs unless without_oids is specified.
Open the table named tablename for insertion of data. Any currently open table is closed.
Close the open table. The name of the table can be given as a cross-check, but this is not required.
Insert a new row into the open table using value1, value2, etc., for its column values and oid_value for its OID. If oid_value is zero (0) or the clause is omitted, and the table has OIDs, then the next available OID is assigned.
NULL values can be specified using the special key word _null_. Values containing spaces must be double quoted.
Create an index named indexname, having OID indexoid, on the table named tablename, using the amname access method. The fields to index are called name1, name2 etc., and the operator classes to use are opclass1, opclass2 etc., respectively. The index file is created and appropriate catalog entries are made for it, but the index contents are not initialized by this command.
Create a TOAST table for the table named tablename. The TOAST table is assigned OID toasttableoid and its index is assigned OID toastindexoid. As with declare index, filling of the index is postponed.
Fill in the indices that have previously been declared.