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 | Publication |
Macros | |
#define | PublicationObjectIndexId 6110 |
#define | PublicationNameIndexId 6111 |
Typedefs | |
typedef FormData_pg_publication * | Form_pg_publication |
typedef struct PublicationActions | PublicationActions |
typedef struct Publication | Publication |
typedef enum PublicationPartOpt | PublicationPartOpt |
Enumerations | |
enum | PublicationPartOpt { PUBLICATION_PART_ROOT, PUBLICATION_PART_LEAF, PUBLICATION_PART_ALL } |
Functions | |
CATALOG (pg_publication, 6104, PublicationRelationId) | |
DECLARE_UNIQUE_INDEX (pg_publication_oid_index, 6110, on pg_publication using btree(oid oid_ops)) | |
DECLARE_UNIQUE_INDEX (pg_publication_pubname_index, 6111, on pg_publication using btree(pubname name_ops)) | |
Publication * | GetPublication (Oid pubid) |
Publication * | GetPublicationByName (const char *pubname, bool missing_ok) |
List * | GetRelationPublications (Oid relid) |
List * | GetPublicationRelations (Oid pubid, PublicationPartOpt pub_partopt) |
List * | GetAllTablesPublications (void) |
List * | GetAllTablesPublicationRelations (bool pubviaroot) |
bool | is_publishable_relation (Relation rel) |
ObjectAddress | publication_add_relation (Oid pubid, Relation targetrel, bool if_not_exists) |
Oid | get_publication_oid (const char *pubname, bool missing_ok) |
char * | get_publication_name (Oid pubid, bool missing_ok) |
Variables | |
FormData_pg_publication | |
#define PublicationNameIndexId 6111 |
Definition at line 69 of file pg_publication.h.
#define PublicationObjectIndexId 6110 |
Definition at line 67 of file pg_publication.h.
Referenced by CreatePublication().
Definition at line 64 of file pg_publication.h.
typedef struct Publication Publication |
typedef struct PublicationActions PublicationActions |
typedef enum PublicationPartOpt PublicationPartOpt |
enum PublicationPartOpt |
Enumerator | |
---|---|
PUBLICATION_PART_ROOT | |
PUBLICATION_PART_LEAF | |
PUBLICATION_PART_ALL |
Definition at line 101 of file pg_publication.h.
CATALOG | ( | pg_publication | , |
6104 | , | ||
PublicationRelationId | |||
) |
Definition at line 29 of file pg_publication.h.
DECLARE_UNIQUE_INDEX | ( | pg_publication_oid_index | , |
6110 | , | ||
on pg_publication using | btreeoid oid_ops | ||
) |
DECLARE_UNIQUE_INDEX | ( | pg_publication_pubname_index | , |
6111 | , | ||
on pg_publication using | btreepubname name_ops | ||
) |
Definition at line 481 of file pg_publication.c.
References elog, ERROR, GETSTRUCT, HeapTupleIsValid, NameStr, ObjectIdGetDatum, pstrdup(), PUBLICATIONOID, ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectDescription(), and getObjectIdentityParts().
Definition at line 461 of file pg_publication.c.
References CStringGetDatum, ereport, errcode(), errmsg(), ERROR, GetSysCacheOid1, OidIsValid, and PUBLICATIONNAME.
Referenced by get_object_address_unqualified(), and GetPublicationByName().
Definition at line 352 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 311 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 GetRelationPublicationActions().
Publication* GetPublication | ( | Oid | pubid | ) |
Definition at line 413 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, PUBLICATIONOID, PublicationActions::pubtruncate, PublicationActions::pubupdate, Publication::pubviaroot, ReleaseSysCache(), and SearchSysCache1().
Referenced by GetPublicationByName(), and publication_add_relation().
Publication* GetPublicationByName | ( | const char * | pubname, |
bool | missing_ok | ||
) |
Definition at line 445 of file pg_publication.c.
References get_publication_oid(), GetPublication(), and OidIsValid.
Referenced by get_object_address_publication_rel(), LoadPublications(), and pg_get_publication_tables().
List* GetPublicationRelations | ( | Oid | pubid, |
PublicationPartOpt | pub_partopt | ||
) |
Definition at line 248 of file pg_publication.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, find_all_inheritors(), get_rel_relkind(), GETSTRUCT, HeapTupleIsValid, lappend_oid(), lfirst_oid, list_concat(), NIL, NoLock, ObjectIdGetDatum, PUBLICATION_PART_ALL, PUBLICATION_PART_LEAF, PUBLICATION_PART_ROOT, PublicationRelPrrelidPrpubidIndexId, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPublicationOptions(), AlterPublicationTables(), and pg_get_publication_tables().
Definition at line 219 of file pg_publication.c.
References GETSTRUCT, i, lappend_oid(), catclist::members, catclist::n_members, NIL, ObjectIdGetDatum, PUBLICATIONRELMAP, ReleaseSysCacheList, SearchSysCacheList1, and catctup::tuple.
Referenced by ATPrepChangePersistence(), get_rel_sync_entry(), and GetRelationPublicationActions().
Definition at line 111 of file pg_publication.c.
References is_publishable_class(), RelationData::rd_rel, and RelationGetRelid.
Referenced by GetRelationPublicationActions(), pgoutput_change(), and pgoutput_truncate().
ObjectAddress publication_add_relation | ( | Oid | pubid, |
Relation | targetrel, | ||
bool | if_not_exists | ||
) |
Definition at line 144 of file pg_publication.c.
References CacheInvalidateRelcache(), CatalogTupleInsert(), check_publication_add_relation(), DEPENDENCY_AUTO, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, GetNewOidWithIndex(), GetPublication(), heap_form_tuple(), heap_freetuple(), InvalidObjectAddress, Publication::name, ObjectAddressSet, ObjectIdGetDatum, PUBLICATIONRELMAP, PublicationRelObjectIndexId, recordDependencyOn(), RelationGetDescr, RelationGetRelationName, RelationGetRelid, RowExclusiveLock, SearchSysCacheExists2, table_close(), table_open(), and values.
Referenced by PublicationAddTables().
FormData_pg_publication |
Definition at line 57 of file pg_publication.h.