PostgreSQL Source Code
git master
|
Go to the source code of this file.
Typedefs | |
typedef FormData_pg_attrdef * | Form_pg_attrdef |
Functions | |
CATALOG (pg_attrdef, 2604, AttrDefaultRelationId) | |
DECLARE_TOAST (pg_attrdef, 2830, 2831) | |
DECLARE_UNIQUE_INDEX (pg_attrdef_adrelid_adnum_index, 2656, AttrDefaultIndexId, pg_attrdef, btree(adrelid oid_ops, adnum int2_ops)) | |
DECLARE_UNIQUE_INDEX_PKEY (pg_attrdef_oid_index, 2657, AttrDefaultOidIndexId, pg_attrdef, btree(oid oid_ops)) | |
DECLARE_FOREIGN_KEY ((adrelid, adnum), pg_attribute,(attrelid, attnum)) | |
Oid | StoreAttrDefault (Relation rel, AttrNumber attnum, Node *expr, bool is_internal, bool add_column_mode) |
void | RemoveAttrDefault (Oid relid, AttrNumber attnum, DropBehavior behavior, bool complain, bool internal) |
void | RemoveAttrDefaultById (Oid attrdefId) |
Oid | GetAttrDefaultOid (Oid relid, AttrNumber attnum) |
ObjectAddress | GetAttrDefaultColumnAddress (Oid attrdefoid) |
Variables | |
FormData_pg_attrdef | |
typedef FormData_pg_attrdef* Form_pg_attrdef |
Definition at line 49 of file pg_attrdef.h.
CATALOG | ( | pg_attrdef | , |
2604 | , | ||
AttrDefaultRelationId | |||
) |
DECLARE_FOREIGN_KEY | ( | (adrelid, adnum) | , |
pg_attribute | , | ||
(attrelid, attnum) | |||
) |
DECLARE_TOAST | ( | pg_attrdef | , |
2830 | , | ||
2831 | |||
) |
DECLARE_UNIQUE_INDEX | ( | pg_attrdef_adrelid_adnum_index | , |
2656 | , | ||
AttrDefaultIndexId | , | ||
pg_attrdef | , | ||
btree(adrelid oid_ops, adnum int2_ops) | |||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_attrdef_oid_index | , |
2657 | , | ||
AttrDefaultOidIndexId | , | ||
pg_attrdef | , | ||
btree(oid oid_ops) | |||
) |
ObjectAddress GetAttrDefaultColumnAddress | ( | Oid | attrdefoid | ) |
Definition at line 381 of file pg_attrdef.c.
References AccessShareLock, BTEqualStrategyNumber, ObjectAddress::classId, GETSTRUCT, HeapTupleIsValid, InvalidObjectAddress, ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by getObjectDescription(), getObjectIdentityParts(), and RememberAllDependentForRebuilding().
Oid GetAttrDefaultOid | ( | Oid | relid, |
AttrNumber | attnum | ||
) |
Definition at line 339 of file pg_attrdef.c.
References AccessShareLock, attnum, BTEqualStrategyNumber, GETSTRUCT, HeapTupleIsValid, Int16GetDatum(), InvalidOid, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by ATExecAlterColumnType(), ATExecDropExpression(), ATExecSetExpression(), and get_object_address_attrdef().
void RemoveAttrDefault | ( | Oid | relid, |
AttrNumber | attnum, | ||
DropBehavior | behavior, | ||
bool | complain, | ||
bool | internal | ||
) |
Definition at line 213 of file pg_attrdef.c.
References attnum, BTEqualStrategyNumber, elog, ERROR, GETSTRUCT, HeapTupleIsValid, Int16GetDatum(), ObjectIdGetDatum(), PERFORM_DELETION_INTERNAL, performDeletion(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by ATExecAlterColumnType(), ATExecColumnDefault(), ATExecCookedColumnDefault(), ATExecDropExpression(), and ATExecSetExpression().
void RemoveAttrDefaultById | ( | Oid | attrdefId | ) |
Definition at line 268 of file pg_attrdef.c.
References AccessExclusiveLock, BTEqualStrategyNumber, CatalogTupleDelete(), CatalogTupleUpdate(), elog, ERROR, GETSTRUCT, HeapTupleIsValid, Int16GetDatum(), NoLock, ObjectIdGetDatum(), relation_close(), relation_open(), RowExclusiveLock, ScanKeyInit(), SearchSysCacheCopy2, systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().
Oid StoreAttrDefault | ( | Relation | rel, |
AttrNumber | attnum, | ||
Node * | expr, | ||
bool | is_internal, | ||
bool | add_column_mode | ||
) |
Definition at line 46 of file pg_attrdef.c.
References attnum, CatalogTupleInsert(), CatalogTupleUpdate(), ObjectAddress::classId, construct_array(), CreateExecutorState(), CStringGetTextDatum, DatumGetPointer(), DEPENDENCY_AUTO, DEPENDENCY_INTERNAL, DEPENDENCY_NORMAL, elog, ERROR, ExecEvalExpr(), ExecPrepareExpr(), expression_planner(), FreeExecutorState(), GetNewOidWithIndex(), GetPerTupleExprContext, GETSTRUCT, heap_form_tuple(), heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, Int16GetDatum(), InvokeObjectPostCreateHookArg, nodeToString(), ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, pfree(), PointerGetDatum(), RelationData::rd_att, RelationData::rd_rel, recordDependencyOn(), recordDependencyOnSingleRelExpr(), RelationGetDescr, RelationGetRelid, RowExclusiveLock, SearchSysCacheCopy2, HeapTupleData::t_self, table_close(), table_open(), TupleDescAttr, and values.
Referenced by AddRelationNewConstraints(), ATExecAlterColumnType(), ATExecCookedColumnDefault(), and StoreConstraints().
FormData_pg_attrdef |
Definition at line 42 of file pg_attrdef.h.