/* flag bits for CheckAttributeType/CheckAttributeNamesTypes */ #define CHKATYPE_ANYARRAY 0x01 /* allow ANYARRAY */ #define CHKATYPE_ANYRECORD 0x02 /* allow RECORD and RECORD[] */ #define CHKATYPE_IS_PARTKEY 0x04 /* attname is part key # not column */ #define CHKATYPE_IS_VIRTUAL 0x08 /* is virtual generated column */
typedefstruct RawColumnDefault
{
AttrNumber attnum; /* attribute to attach default to */
Node *raw_default; /* default value (untransformed parse tree) */ char generated; /* attgenerated setting */
} RawColumnDefault;
typedefstruct CookedConstraint
{
ConstrType contype; /* CONSTR_DEFAULT, CONSTR_CHECK,
* CONSTR_NOTNULL */
Oid conoid; /* constr OID if created, otherwise Invalid */ char *name; /* name, or NULL if none */
AttrNumber attnum; /* which attr (only for NOTNULL, DEFAULT) */
Node *expr; /* transformed default or check expr */ bool is_enforced; /* is enforced? (only for CHECK) */ bool skip_validation; /* skip validation? (only for CHECK) */ bool is_local; /* constraint has local (non-inherited) def */
int16 inhcount; /* number of times constraint is inherited */ bool is_no_inherit; /* constraint has local def and cannot be
* inherited */
} CookedConstraint;
extern Relation heap_create(constchar *relname,
Oid relnamespace,
Oid reltablespace,
Oid relid,
RelFileNumber relfilenumber,
Oid accessmtd,
TupleDesc tupDesc, char relkind, char relpersistence, bool shared_relation, bool mapped_relation, bool allow_system_table_mods,
TransactionId *relfrozenxid,
MultiXactId *relminmxid, bool create_storage);
extern Oid heap_create_with_catalog(constchar *relname,
Oid relnamespace,
Oid reltablespace,
Oid relid,
Oid reltypeid,
Oid reloftypeid,
Oid ownerid,
Oid accessmtd,
TupleDesc tupdesc,
List *cooked_constraints, char relkind, char relpersistence, bool shared_relation, bool mapped_relation,
OnCommitAction oncommit,
Datum reloptions, bool use_user_acl, bool allow_system_table_mods, bool is_internal,
Oid relrewrite,
ObjectAddress *typaddress);
externvoid InsertPgClassTuple(Relation pg_class_desc,
Relation new_rel_desc,
Oid new_rel_oid,
Datum relacl,
Datum reloptions);
extern List *AddRelationNewConstraints(Relation rel,
List *newColDefaults,
List *newConstraints, bool allow_merge, bool is_local, bool is_internal, constchar *queryString); extern List *AddRelationNotNullConstraints(Relation rel,
List *constraints,
List *old_notnulls,
List *existing_constraints);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.