4 create tablename tableoid [bootstrap] [shared_relation] [rowtype_oid
5 oid] (name1 = type1 [FORCE NOT NULL | FORCE NULL ] [, name2 =
6 type2 [FORCE NOT NULL | FORCE NULL ], ...])
7 Create a table named tablename, and having the OID tableoid,
8 with the columns given in parentheses.
10 The following column types are supported directly by
11 bootstrap.c: bool, bytea, char (1 byte), name, int2, int4,
12 regproc, regclass, regtype, text, oid, tid, xid, cid,
13 int2vector, oidvector, _int4 (array), _text (array), _oid
14 (array), _char (array), _aclitem (array). Although it is
15 possible to create tables containing columns of other types,
16 this cannot be done until after pg_type has been created and
17 filled with appropriate entries. (That effectively means that
18 only these column types can be used in bootstrap catalogs, but
19 non-bootstrap catalogs can contain any built-in type.)
21 When bootstrap is specified, the table will only be created on
22 disk; nothing is entered into pg_class, pg_attribute, etc., for
23 it. Thus the table will not be accessible by ordinary SQL
24 operations until such entries are made the hard way (with insert
25 commands). This option is used for creating pg_class etc.
28 The table is created as shared if shared_relation is specified.
29 The table's row type OID (pg_type OID) can optionally be
30 specified via the rowtype_oid clause; if not specified, an OID
31 is automatically generated for it. (The rowtype_oid clause is
32 useless if bootstrap is specified, but it can be provided anyway
36 Open the table named tablename for insertion of data. Any
37 currently open table is closed.
40 Close the open table. The name of the table must be given as a
43 insert ( [oid_value] value1 value2 ... )
44 Insert a new row into the open table using value1, value2, etc.,
45 for its column values.
47 NULL values can be specified using the special key word _null_.
48 Values that do not look like identifiers or digit strings must
49 be single-quoted. (To include a single quote in a value, write
50 it twice. Escape-string-style backslash escapes are allowed in
53 declare [unique] index indexname indexoid on tablename using amname (
54 opclass1 name1 [, ...] )
55 Create an index named indexname, having OID indexoid, on the
56 table named tablename, using the amname access method. The
57 fields to index are called name1, name2 etc., and the operator
58 classes to use are opclass1, opclass2 etc., respectively. The
59 index file is created and appropriate catalog entries are made
60 for it, but the index contents are not initialized by this
63 declare toast toasttableoid toastindexoid on tablename
64 Create a TOAST table for the table named tablename. The TOAST
65 table is assigned OID toasttableoid and its index is assigned
66 OID toastindexoid. As with declare index, filling of the index
70 Fill in the indices that have previously been declared.