PostgreSQL Source Code git master
|
Go to the source code of this file.
Macros | |
#define | MAX_RELCACHE_INVAL_MSGS 4096 |
Functions | |
ObjectAddress | CreatePublication (ParseState *pstate, CreatePublicationStmt *stmt) |
void | AlterPublication (ParseState *pstate, AlterPublicationStmt *stmt) |
void | RemovePublicationById (Oid pubid) |
void | RemovePublicationRelById (Oid proid) |
void | RemovePublicationSchemaById (Oid psoid) |
ObjectAddress | AlterPublicationOwner (const char *name, Oid newOwnerId) |
void | AlterPublicationOwner_oid (Oid subid, Oid newOwnerId) |
void | InvalidatePublicationRels (List *relids) |
bool | pub_rf_contains_invalid_column (Oid pubid, Relation relation, List *ancestors, bool pubviaroot) |
bool | pub_contains_invalid_column (Oid pubid, Relation relation, List *ancestors, bool pubviaroot, bool pubgencols, bool *invalid_column_list, bool *invalid_gen_col) |
#define MAX_RELCACHE_INVAL_MSGS 4096 |
Definition at line 23 of file publicationcmds.h.
void AlterPublication | ( | ParseState * | pstate, |
AlterPublicationStmt * | stmt | ||
) |
Definition at line 1416 of file publicationcmds.c.
References AccessExclusiveLock, aclcheck_error(), ACLCHECK_NOT_OWNER, AlterPublicationOptions(), AlterPublicationSchemas(), AlterPublicationTables(), CheckAlterPublication(), CStringGetDatum(), ereport, errcode(), errmsg(), ERROR, GETSTRUCT, GetUserId(), heap_freetuple(), HeapTupleIsValid, LockDatabaseObject(), NIL, object_ownercheck(), OBJECT_PUBLICATION, ObjectIdGetDatum(), ObjectsInPublicationToOids(), ParseState::p_sourcetext, RowExclusiveLock, SearchSysCacheCopy1, stmt, table_close(), and table_open().
Referenced by ProcessUtilitySlow().
ObjectAddress AlterPublicationOwner | ( | const char * | name, |
Oid | newOwnerId | ||
) |
Definition at line 1991 of file publicationcmds.c.
References AlterPublicationOwner_internal(), CStringGetDatum(), ereport, errcode(), errmsg(), ERROR, GETSTRUCT, heap_freetuple(), HeapTupleIsValid, name, ObjectAddressSet, RowExclusiveLock, SearchSysCacheCopy1, table_close(), and table_open().
Referenced by ExecAlterOwnerStmt().
Definition at line 2026 of file publicationcmds.c.
References AlterPublicationOwner_internal(), ereport, errcode(), errmsg(), ERROR, heap_freetuple(), HeapTupleIsValid, ObjectIdGetDatum(), RowExclusiveLock, SearchSysCacheCopy1, table_close(), and table_open().
Referenced by shdepReassignOwned_Owner().
ObjectAddress CreatePublication | ( | ParseState * | pstate, |
CreatePublicationStmt * | stmt | ||
) |
Definition at line 765 of file publicationcmds.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, BoolGetDatum(), CacheInvalidateRelcacheAll(), CatalogTupleInsert(), CheckPubRelationColumnList(), CloseTableList(), CommandCounterIncrement(), CStringGetDatum(), DirectFunctionCall1, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errhint(), errmsg(), ERROR, get_database_name(), GetNewOidWithIndex(), GetSysCacheOid1, GetUserId(), heap_form_tuple(), heap_freetuple(), InvokeObjectPostCreateHook, LockSchemaList(), MyDatabaseId, namein(), NIL, object_aclcheck(), OBJECT_DATABASE, ObjectAddressSet, ObjectIdGetDatum(), ObjectsInPublicationToOids(), OidIsValid, OpenTableList(), ParseState::p_sourcetext, parse_publication_options(), PublicationActions::pubdelete, PublicationActions::pubinsert, PublicationAddSchemas(), PublicationAddTables(), PublicationActions::pubtruncate, PublicationActions::pubupdate, recordDependencyOnOwner(), RelationGetDescr, RowExclusiveLock, stmt, superuser(), table_close(), table_open(), TransformPubWhereClauses(), values, wal_level, WAL_LEVEL_LOGICAL, and WARNING.
Referenced by ProcessUtilitySlow().
void InvalidatePublicationRels | ( | List * | relids | ) |
Definition at line 1111 of file publicationcmds.c.
References CacheInvalidateRelcacheAll(), CacheInvalidateRelcacheByRelid(), lfirst_oid, list_length(), and MAX_RELCACHE_INVAL_MSGS.
Referenced by AlterPublicationOptions(), publication_add_relation(), publication_add_schema(), RemovePublicationRelById(), and RemovePublicationSchemaById().
bool pub_contains_invalid_column | ( | Oid | pubid, |
Relation | relation, | ||
List * | ancestors, | ||
bool | pubviaroot, | ||
bool | pubgencols, | ||
bool * | invalid_column_list, | ||
bool * | invalid_gen_col | ||
) |
Definition at line 354 of file publicationcmds.c.
References attnum, bms_free(), bms_is_member(), bms_next_member(), check_and_fetch_column_list(), TupleDescData::constr, FirstLowInvalidHeapAttributeNumber, get_attname(), get_attnum(), GetPublication(), GetTopMostAncestorInPublication(), TupleConstr::has_generated_stored, INDEX_ATTR_BITMAP_IDENTITY_KEY, OidIsValid, RelationData::rd_att, RelationData::rd_rel, RelationGetDescr, RelationGetIndexAttrBitmap(), RelationGetRelid, TupleDescAttr(), and x.
Referenced by RelationBuildPublicationDesc().
bool pub_rf_contains_invalid_column | ( | Oid | pubid, |
Relation | relation, | ||
List * | ancestors, | ||
bool | pubviaroot | ||
) |
Definition at line 269 of file publicationcmds.c.
References rf_context::bms_replident, contain_invalid_rfcolumn_walker(), GetTopMostAncestorInPublication(), HeapTupleIsValid, INDEX_ATTR_BITMAP_IDENTITY_KEY, ObjectIdGetDatum(), OidIsValid, rf_context::parentid, rf_context::pubviaroot, RelationData::rd_rel, RelationGetIndexAttrBitmap(), RelationGetRelid, ReleaseSysCache(), rf_context::relid, SearchSysCache2(), stringToNode(), SysCacheGetAttr(), and TextDatumGetCString.
Referenced by RelationBuildPublicationDesc().
void RemovePublicationById | ( | Oid | pubid | ) |
Definition at line 1527 of file publicationcmds.c.
References CacheInvalidateRelcacheAll(), CatalogTupleDelete(), elog, ERROR, GETSTRUCT, HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().
void RemovePublicationRelById | ( | Oid | proid | ) |
Definition at line 1486 of file publicationcmds.c.
References CatalogTupleDelete(), elog, ERROR, GetPubPartitionOptionRelations(), GETSTRUCT, HeapTupleIsValid, InvalidatePublicationRels(), NIL, ObjectIdGetDatum(), PUBLICATION_PART_ALL, ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().
void RemovePublicationSchemaById | ( | Oid | psoid | ) |
Definition at line 1556 of file publicationcmds.c.
References CatalogTupleDelete(), elog, ERROR, GetSchemaPublicationRelations(), GETSTRUCT, HeapTupleIsValid, InvalidatePublicationRels(), NIL, ObjectIdGetDatum(), PUBLICATION_PART_ALL, ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().