PostgreSQL Source Code
git master
|
#include "catalog/genbki.h"
#include "catalog/objectaddress.h"
#include "catalog/pg_publication_d.h"
Go to the source code of this file.
Data Structures | |
struct | PublicationActions |
struct | PublicationDesc |
struct | Publication |
struct | PublicationRelInfo |
Typedefs | |
typedef FormData_pg_publication * | Form_pg_publication |
typedef struct PublicationActions | PublicationActions |
typedef struct PublicationDesc | PublicationDesc |
typedef struct Publication | Publication |
typedef struct PublicationRelInfo | PublicationRelInfo |
typedef enum PublicationPartOpt | PublicationPartOpt |
Enumerations | |
enum | PublicationPartOpt { PUBLICATION_PART_ROOT , PUBLICATION_PART_LEAF , PUBLICATION_PART_ALL } |
Variables | |
FormData_pg_publication | |
Definition at line 64 of file pg_publication.h.
typedef struct Publication Publication |
typedef struct PublicationActions PublicationActions |
typedef struct PublicationDesc PublicationDesc |
typedef enum PublicationPartOpt PublicationPartOpt |
typedef struct PublicationRelInfo PublicationRelInfo |
enum PublicationPartOpt |
Enumerator | |
---|---|
PUBLICATION_PART_ROOT | |
PUBLICATION_PART_LEAF | |
PUBLICATION_PART_ALL |
Definition at line 129 of file pg_publication.h.
CATALOG | ( | pg_publication | , |
6104 | , | ||
PublicationRelationId | |||
) |
DECLARE_UNIQUE_INDEX | ( | pg_publication_pubname_index | , |
6111 | , | ||
PublicationNameIndexId | , | ||
pg_publication | , | ||
btree(pubname name_ops) | |||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_publication_oid_index | , |
6110 | , | ||
PublicationObjectIndexId | , | ||
pg_publication | , | ||
btree(oid oid_ops) | |||
) |
List* GetAllSchemaPublicationRelations | ( | Oid | pubid, |
PublicationPartOpt | pub_partopt | ||
) |
Definition at line 964 of file pg_publication.c.
References GetPublicationSchemas(), GetSchemaPublicationRelations(), lfirst_oid, list_concat(), and NIL.
Referenced by AlterPublicationOptions(), and pg_get_publication_tables().
Definition at line 782 of file pg_publication.c.
References AccessShareLock, BTEqualStrategyNumber, CharGetDatum(), ForwardScanDirection, GETSTRUCT, heap_getnext(), is_publishable_class(), sort-test::key, lappend_oid(), NIL, ScanKeyInit(), table_beginscan_catalog(), table_close(), table_endscan(), and table_open().
Referenced by pg_get_publication_tables().
List* GetAllTablesPublications | ( | void | ) |
Definition at line 741 of file pg_publication.c.
References AccessShareLock, BoolGetDatum(), BTEqualStrategyNumber, GETSTRUCT, HeapTupleIsValid, InvalidOid, lappend_oid(), NIL, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by RelationBuildPublicationDesc().
Publication* GetPublication | ( | Oid | pubid | ) |
Definition at line 988 of file pg_publication.c.
References Publication::alltables, elog, ERROR, GETSTRUCT, HeapTupleIsValid, Publication::name, NameStr, ObjectIdGetDatum(), Publication::oid, palloc(), pstrdup(), Publication::pubactions, PublicationActions::pubdelete, PublicationActions::pubinsert, PublicationActions::pubtruncate, PublicationActions::pubupdate, Publication::pubviaroot, ReleaseSysCache(), and SearchSysCache1().
Referenced by GetPublicationByName(), pg_get_publication_tables(), publication_add_relation(), and publication_add_schema().
Publication* GetPublicationByName | ( | const char * | pubname, |
bool | missing_ok | ||
) |
Definition at line 1019 of file pg_publication.c.
References get_publication_oid(), GetPublication(), and OidIsValid.
Referenced by get_object_address_publication_rel(), get_object_address_publication_schema(), LoadPublications(), and pg_get_publication_tables().
List* GetPublicationRelations | ( | Oid | pubid, |
PublicationPartOpt | pub_partopt | ||
) |
Definition at line 698 of file pg_publication.c.
References AccessShareLock, BTEqualStrategyNumber, GetPubPartitionOptionRelations(), GETSTRUCT, HeapTupleIsValid, list_deduplicate_oid(), list_oid_cmp(), list_sort(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPublicationOptions(), AlterPublicationSchemas(), AlterPublicationTables(), and pg_get_publication_tables().
Definition at line 843 of file pg_publication.c.
References AccessShareLock, BTEqualStrategyNumber, GETSTRUCT, HeapTupleIsValid, lappend_oid(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPublicationSchemas(), and GetAllSchemaPublicationRelations().
List* GetPubPartitionOptionRelations | ( | List * | result, |
PublicationPartOpt | pub_partopt, | ||
Oid | relid | ||
) |
Definition at line 264 of file pg_publication.c.
References Assert, find_all_inheritors(), get_rel_relkind(), lappend_oid(), lfirst_oid, list_concat(), NoLock, PUBLICATION_PART_ALL, PUBLICATION_PART_LEAF, and PUBLICATION_PART_ROOT.
Referenced by AlterPublicationOptions(), GetPublicationRelations(), GetSchemaPublicationRelations(), publication_add_relation(), and RemovePublicationRelById().
Definition at line 669 of file pg_publication.c.
References GETSTRUCT, i, lappend_oid(), catclist::members, catclist::n_members, NIL, ObjectIdGetDatum(), ReleaseSysCacheList, SearchSysCacheList1, and catctup::tuple.
Referenced by ATPrepChangePersistence(), get_rel_sync_entry(), GetTopMostAncestorInPublication(), and RelationBuildPublicationDesc().
List* GetSchemaPublicationRelations | ( | Oid | schemaid, |
PublicationPartOpt | pub_partopt | ||
) |
Definition at line 907 of file pg_publication.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, ForwardScanDirection, get_rel_relkind(), GetPubPartitionOptionRelations(), GETSTRUCT, heap_getnext(), is_publishable_class(), sort-test::key, lappend_oid(), list_concat_unique_oid(), NIL, OidIsValid, ScanKeyInit(), table_beginscan_catalog(), table_close(), table_endscan(), and table_open().
Referenced by GetAllSchemaPublicationRelations(), publication_add_schema(), and RemovePublicationSchemaById().
Definition at line 881 of file pg_publication.c.
References GETSTRUCT, i, lappend_oid(), catclist::members, catclist::n_members, NIL, ObjectIdGetDatum(), ReleaseSysCacheList, SearchSysCacheList1, and catctup::tuple.
Referenced by get_rel_sync_entry(), GetTopMostAncestorInPublication(), and RelationBuildPublicationDesc().
Definition at line 308 of file pg_publication.c.
References get_rel_namespace(), GetRelationPublications(), GetSchemaPublications(), InvalidOid, lfirst_oid, list_free(), list_member_oid(), and NIL.
Referenced by get_rel_sync_entry(), pub_collist_contains_invalid_column(), and pub_rf_contains_invalid_column().
Definition at line 147 of file pg_publication.c.
References is_publishable_class(), RelationData::rd_rel, and RelationGetRelid.
Referenced by pgoutput_change(), pgoutput_truncate(), and RelationBuildPublicationDesc().
Definition at line 233 of file pg_publication.c.
References AccessShareLock, BTEqualStrategyNumber, HeapTupleIsValid, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPublicationOwner_internal(), and AlterPublicationTables().
MAKE_SYSCACHE | ( | PUBLICATIONNAME | , |
pg_publication_pubname_index | , | ||
8 | |||
) |
MAKE_SYSCACHE | ( | PUBLICATIONOID | , |
pg_publication_oid_index | , | ||
8 | |||
) |
Bitmapset* pub_collist_to_bitmapset | ( | Bitmapset * | columns, |
Datum | pubcols, | ||
MemoryContext | mcxt | ||
) |
Definition at line 559 of file pg_publication.c.
References ARR_DATA_PTR, ARR_DIMS, bms_add_member(), DatumGetArrayTypeP, i, and MemoryContextSwitchTo().
Referenced by AlterPublicationTables(), pgoutput_column_list_init(), and pub_collist_contains_invalid_column().
Definition at line 510 of file pg_publication.c.
References attnum, AttrNumberIsForUserDefinedAttr, bms_add_member(), bms_is_member(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, get_attnum(), InvalidAttrNumber, lfirst, RelationGetDescr, RelationGetRelationName, RelationGetRelid, strVal, and TupleDescAttr.
Referenced by AlterPublicationTables(), and publication_add_relation().
ObjectAddress publication_add_relation | ( | Oid | pubid, |
PublicationRelInfo * | pri, | ||
bool | if_not_exists | ||
) |
Definition at line 382 of file pg_publication.c.
References attnumstoint2vector(), bms_next_member(), CatalogTupleInsert(), check_publication_add_relation(), PublicationRelInfo::columns, CStringGetTextDatum, DEPENDENCY_AUTO, DEPENDENCY_NORMAL, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, GetNewOidWithIndex(), GetPublication(), GetPubPartitionOptionRelations(), heap_form_tuple(), heap_freetuple(), i, InvalidatePublicationRels(), InvalidObjectAddress, Publication::name, NIL, nodeToString(), ObjectAddressSet, ObjectAddressSubSet, ObjectIdGetDatum(), PointerGetDatum(), pub_collist_validate(), PUBLICATION_PART_ALL, recordDependencyOn(), recordDependencyOnSingleRelExpr(), PublicationRelInfo::relation, RelationGetDescr, RelationGetRelationName, RelationGetRelid, RowExclusiveLock, SearchSysCacheExists2, table_close(), table_open(), values, and PublicationRelInfo::whereClause.
Referenced by PublicationAddTables().
ObjectAddress publication_add_schema | ( | Oid | pubid, |
Oid | schemaid, | ||
bool | if_not_exists | ||
) |
Definition at line 588 of file pg_publication.c.
References CatalogTupleInsert(), check_publication_add_schema(), DEPENDENCY_AUTO, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, get_namespace_name(), GetNewOidWithIndex(), GetPublication(), GetSchemaPublicationRelations(), heap_form_tuple(), heap_freetuple(), InvalidatePublicationRels(), InvalidObjectAddress, Publication::name, NIL, ObjectAddressSet, ObjectIdGetDatum(), PUBLICATION_PART_ALL, recordDependencyOn(), RelationGetDescr, RowExclusiveLock, SearchSysCacheExists2, table_close(), table_open(), and values.
Referenced by PublicationAddSchemas().
FormData_pg_publication |
Definition at line 57 of file pg_publication.h.