|
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 pubid, 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, char pubgencols_type, bool *invalid_column_list, bool *invalid_gen_col) |
| void | InvalidatePubRelSyncCache (Oid pubid, bool puballtables) |
| #define MAX_RELCACHE_INVAL_MSGS 4096 |
Definition at line 23 of file publicationcmds.h.
| void AlterPublication | ( | ParseState * | pstate, |
| AlterPublicationStmt * | stmt | ||
| ) |
Definition at line 1530 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 2098 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 2133 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 826 of file publicationcmds.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, BoolGetDatum(), CacheInvalidateRelcacheAll(), CatalogTupleInsert(), CharGetDatum(), 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, NOTICE, 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 1195 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().
| void InvalidatePubRelSyncCache | ( | Oid | pubid, |
| bool | puballtables | ||
| ) |
Definition at line 500 of file publicationcmds.c.
References CacheInvalidateRelSync(), CacheInvalidateRelSyncAll(), foreach_oid, GetAllSchemaPublicationRelations(), GetPublicationRelations(), list_concat_unique_oid(), NIL, and PUBLICATION_PART_ALL.
Referenced by AlterObjectRename_internal().
| bool pub_contains_invalid_column | ( | Oid | pubid, |
| Relation | relation, | ||
| List * | ancestors, | ||
| bool | pubviaroot, | ||
| char | pubgencols_type, | ||
| bool * | invalid_column_list, | ||
| bool * | invalid_gen_col | ||
| ) |
Definition at line 356 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, TupleConstr::has_generated_virtual, 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 270 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 1641 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 1600 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 1670 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().