|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "access/relation.h"#include "access/table.h"#include "catalog/dependency.h"#include "catalog/indexing.h"#include "catalog/objectaccess.h"#include "catalog/pg_attrdef.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/rel.h"#include "utils/syscache.h"
Go to the source code of this file.
Functions | |
| Oid | StoreAttrDefault (Relation rel, AttrNumber attnum, Node *expr, bool is_internal) |
| 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) |
| ObjectAddress GetAttrDefaultColumnAddress | ( | Oid | attrdefoid | ) |
Definition at line 321 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 EventTriggerSQLDropAddObject(), getObjectDescription(), getObjectIdentityParts(), and RememberAllDependentForRebuilding().
| Oid GetAttrDefaultOid | ( | Oid | relid, |
| AttrNumber | attnum | ||
| ) |
Definition at line 279 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 153 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 208 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 | ||
| ) |
Definition at line 36 of file pg_attrdef.c.
References attnum, BoolGetDatum(), CatalogTupleInsert(), CatalogTupleUpdate(), ObjectAddress::classId, CStringGetTextDatum, DatumGetPointer(), DEPENDENCY_AUTO, DEPENDENCY_INTERNAL, DEPENDENCY_NORMAL, elog, ERROR, GetNewOidWithIndex(), GETSTRUCT(), heap_form_tuple(), heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, Int16GetDatum(), InvokeObjectPostCreateHookArg, nodeToString(), ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, pfree(), RelationData::rd_att, recordDependencyOn(), recordDependencyOnSingleRelExpr(), RelationGetDescr, RelationGetRelid, RowExclusiveLock, SearchSysCacheCopy2, HeapTupleData::t_self, table_close(), table_open(), and values.
Referenced by AddRelationNewConstraints(), ATExecAlterColumnType(), ATExecCookedColumnDefault(), and StoreConstraints().