PostgreSQL Source Code
git master
|
#include "pg_backup.h"
Go to the source code of this file.
Data Structures | |
struct | _dumpableObject |
struct | _dumpableAcl |
struct | _dumpableObjectWithAcl |
struct | _namespaceInfo |
struct | _extensionInfo |
struct | _typeInfo |
struct | _shellTypeInfo |
struct | _funcInfo |
struct | _aggInfo |
struct | _oprInfo |
struct | _accessMethodInfo |
struct | _opclassInfo |
struct | _opfamilyInfo |
struct | _collInfo |
struct | _convInfo |
struct | _tableInfo |
struct | _tableAttachInfo |
struct | _attrDefInfo |
struct | _tableDataInfo |
struct | _indxInfo |
struct | _indexAttachInfo |
struct | _statsExtInfo |
struct | _ruleInfo |
struct | _triggerInfo |
struct | _evttriggerInfo |
struct | _constraintInfo |
struct | _procLangInfo |
struct | _castInfo |
struct | _transformInfo |
struct | _inhInfo |
struct | _prsInfo |
struct | _dictInfo |
struct | _tmplInfo |
struct | _cfgInfo |
struct | _fdwInfo |
struct | _foreignServerInfo |
struct | _defaultACLInfo |
struct | _loInfo |
struct | _policyInfo |
struct | _PublicationInfo |
struct | _PublicationRelInfo |
struct | _PublicationSchemaInfo |
struct | _SubscriptionInfo |
Macros | |
#define | oidcmp(x, y) ( ((x) < (y) ? -1 : ((x) > (y)) ? 1 : 0) ) |
#define | DUMP_COMPONENT_NONE (0) |
#define | DUMP_COMPONENT_DEFINITION (1 << 0) |
#define | DUMP_COMPONENT_DATA (1 << 1) |
#define | DUMP_COMPONENT_COMMENT (1 << 2) |
#define | DUMP_COMPONENT_SECLABEL (1 << 3) |
#define | DUMP_COMPONENT_ACL (1 << 4) |
#define | DUMP_COMPONENT_POLICY (1 << 5) |
#define | DUMP_COMPONENT_USERMAP (1 << 6) |
#define | DUMP_COMPONENT_ALL (0xFFFF) |
#define | DUMP_COMPONENTS_REQUIRING_LOCK |
Enumerations | |
enum | DumpableObjectType { DO_NAMESPACE , DO_EXTENSION , DO_TYPE , DO_SHELL_TYPE , DO_FUNC , DO_AGG , DO_OPERATOR , DO_ACCESS_METHOD , DO_OPCLASS , DO_OPFAMILY , DO_COLLATION , DO_CONVERSION , DO_TABLE , DO_TABLE_ATTACH , DO_ATTRDEF , DO_INDEX , DO_INDEX_ATTACH , DO_STATSEXT , DO_RULE , DO_TRIGGER , DO_CONSTRAINT , DO_FK_CONSTRAINT , DO_PROCLANG , DO_CAST , DO_TABLE_DATA , DO_SEQUENCE_SET , DO_DUMMY_TYPE , DO_TSPARSER , DO_TSDICT , DO_TSTEMPLATE , DO_TSCONFIG , DO_FDW , DO_FOREIGN_SERVER , DO_DEFAULT_ACL , DO_TRANSFORM , DO_LARGE_OBJECT , DO_LARGE_OBJECT_DATA , DO_PRE_DATA_BOUNDARY , DO_POST_DATA_BOUNDARY , DO_EVENT_TRIGGER , DO_REFRESH_MATVIEW , DO_POLICY , DO_PUBLICATION , DO_PUBLICATION_REL , DO_PUBLICATION_TABLE_IN_SCHEMA , DO_SUBSCRIPTION } |
#define DUMP_COMPONENTS_REQUIRING_LOCK |
typedef struct _accessMethodInfo AccessMethodInfo |
typedef struct _attrDefInfo AttrDefInfo |
typedef struct _constraintInfo ConstraintInfo |
typedef struct _defaultACLInfo DefaultACLInfo |
typedef struct _dumpableAcl DumpableAcl |
typedef struct _dumpableObject DumpableObject |
typedef struct _dumpableObjectWithAcl DumpableObjectWithAcl |
typedef uint32 DumpComponents |
typedef struct _evttriggerInfo EventTriggerInfo |
typedef struct _extensionInfo ExtensionInfo |
typedef struct _foreignServerInfo ForeignServerInfo |
typedef struct _indexAttachInfo IndexAttachInfo |
typedef struct _namespaceInfo NamespaceInfo |
typedef struct _opclassInfo OpclassInfo |
typedef struct _opfamilyInfo OpfamilyInfo |
typedef struct _policyInfo PolicyInfo |
typedef struct _procLangInfo ProcLangInfo |
typedef struct _PublicationInfo PublicationInfo |
typedef struct _PublicationRelInfo PublicationRelInfo |
typedef struct _PublicationSchemaInfo PublicationSchemaInfo |
typedef struct _shellTypeInfo ShellTypeInfo |
typedef struct _statsExtInfo StatsExtInfo |
typedef struct _SubscriptionInfo SubscriptionInfo |
typedef struct _tableAttachInfo TableAttachInfo |
typedef struct _tableDataInfo TableDataInfo |
typedef struct _tableInfo TableInfo |
typedef struct _transformInfo TransformInfo |
typedef struct _triggerInfo TriggerInfo |
typedef struct _cfgInfo TSConfigInfo |
typedef struct _dictInfo TSDictInfo |
typedef struct _prsInfo TSParserInfo |
typedef struct _tmplInfo TSTemplateInfo |
enum DumpableObjectType |
Definition at line 37 of file pg_dump.h.
void addObjectDependency | ( | DumpableObject * | dobj, |
DumpId | refId | ||
) |
Definition at line 732 of file common.c.
References _dumpableObject::allocDeps, _dumpableObject::dependencies, _dumpableObject::nDeps, pg_malloc_array, and pg_realloc_array.
Referenced by addBoundaryDependencies(), addConstrChildIdxDeps(), buildMatViewRefreshDependencies(), checkExtensionMembership(), flagInhAttrs(), flagInhIndexes(), flagInhTables(), getDependencies(), getDomainConstraints(), getRules(), getTableAttrs(), getTableDataFKConstraints(), makeTableDataInfo(), processExtensionTables(), repairDomainConstraintMultiLoop(), repairTableAttrDefMultiLoop(), repairTableConstraintMultiLoop(), repairTypeFuncLoop(), and repairViewRuleMultiLoop().
void AssignDumpId | ( | DumpableObject * | dobj | ) |
Definition at line 595 of file common.c.
References _dumpableObject::allocDeps, allocedDumpIds, Assert(), catalogIdHash, CATALOGIDHASH_INITIAL_SIZE, _dumpableObject::catId, _dumpableObject::components, _dumpableObject::dependencies, _dumpableObject::depends_on_ext, _catalogIdMapEntry::dobj, _dumpableObject::dump, DUMP_COMPONENT_ALL, DUMP_COMPONENT_DEFINITION, _dumpableObject::dump_contains, _dumpableObject::dumpId, dumpIdMap, _catalogIdMapEntry::ext, _dumpableObject::ext_member, lastDumpId, _dumpableObject::name, _dumpableObject::nDeps, OidIsValid, pg_malloc_array, pg_realloc_array, and CatalogId::tableoid.
Referenced by createBoundaryObjects(), flagInhAttrs(), flagInhIndexes(), flagInhTables(), getAccessMethods(), getAggregates(), getCasts(), getCollations(), getConstraints(), getConversions(), getDefaultACLs(), getDomainConstraints(), getEventTriggers(), getExtendedStatistics(), getExtensions(), getForeignDataWrappers(), getForeignServers(), getFuncs(), getIndexes(), getLOs(), getNamespaces(), getOpclasses(), getOperators(), getOpfamilies(), getPolicies(), getProcLangs(), getPublicationNamespaces(), getPublications(), getPublicationTables(), getRules(), getSubscriptions(), getTableAttrs(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), and makeTableDataInfo().
DumpId createDumpId | ( | void | ) |
Definition at line 659 of file common.c.
References lastDumpId.
Referenced by dumpACL(), dumpCommentExtended(), dumpCompositeTypeColComments(), dumpDatabase(), dumpEncoding(), dumpSearchPath(), dumpSecLabel(), dumpSequence(), dumpSequenceData(), dumpStdStrings(), dumpTableComment(), dumpTableSecLabel(), and dumpUserMappings().
Definition at line 868 of file common.c.
References Assert(), DO_COLLATION, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by createDummyViewAsClause(), dumpCompositeType(), dumpDomain(), dumpRangeType(), and dumpTableSchema().
ExtensionInfo* findExtensionByOid | ( | Oid | oid | ) |
Definition at line 904 of file common.c.
References Assert(), DO_EXTENSION, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by getExtensionMembership().
Definition at line 832 of file common.c.
References Assert(), DO_FUNC, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by dumpCast(), dumpProcLang(), and dumpTransform().
NamespaceInfo* findNamespaceByOid | ( | Oid | oid | ) |
Definition at line 886 of file common.c.
References Assert(), DO_NAMESPACE, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by findNamespace(), and getPublicationNamespaces().
DumpableObject* findObjectByCatalogId | ( | CatalogId | catalogId | ) |
Definition at line 692 of file common.c.
References catalogIdHash, and _catalogIdMapEntry::dobj.
Referenced by buildMatViewRefreshDependencies(), collectComments(), collectSecLabels(), findCollationByOid(), findExtensionByOid(), findFuncByOid(), findIndexByOid(), findNamespaceByOid(), findOprByOid(), findPublicationByOid(), findTableByOid(), findTypeByOid(), getAdditionalACLs(), and getDependencies().
DumpableObject* findObjectByDumpId | ( | DumpId | dumpId | ) |
Definition at line 679 of file common.c.
References allocedDumpIds, and dumpIdMap.
Referenced by binary_upgrade_extension_member(), BuildArchiveDependencies(), dumpConstraint(), dumpExtension(), findDumpableDependencies(), and findLoop().
Definition at line 850 of file common.c.
References Assert(), DO_OPERATOR, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by getFormattedOperatorName().
ExtensionInfo* findOwningExtension | ( | CatalogId | catalogId | ) |
Definition at line 965 of file common.c.
References catalogIdHash, and _catalogIdMapEntry::ext.
Referenced by checkExtensionMembership().
PublicationInfo* findPublicationByOid | ( | Oid | oid | ) |
Definition at line 922 of file common.c.
References Assert(), DO_PUBLICATION, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by getPublicationNamespaces(), and getPublicationTables().
Definition at line 777 of file common.c.
References Assert(), DO_TABLE, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by dumpSequence(), findParentsByOid(), getAdditionalACLs(), getConstraints(), getOwnedSeqs(), getPolicies(), getPublicationTables(), getRules(), getTableDataFKConstraints(), processExtensionTables(), and selectDumpableType().
Definition at line 813 of file common.c.
References Assert(), DO_DUMMY_TYPE, DO_TYPE, findObjectByCatalogId(), _dumpableObject::objType, CatalogId::oid, and CatalogId::tableoid.
Referenced by collectComments(), collectSecLabels(), DOTypeNameCompare(), getCasts(), getFormattedTypeName(), and getTransforms().
AccessMethodInfo* getAccessMethods | ( | Archive * | fout, |
int * | numAccessMethods | ||
) |
Definition at line 5651 of file pg_dump.c.
References _accessMethodInfo::amhandler, _accessMethodInfo::amtype, appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_ACCESS_METHOD, _accessMethodInfo::dobj, ExecuteSqlQuery(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), Archive::remoteVersion, res, selectDumpableAccessMethod(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 5856 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpOptions::binary_upgrade, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_AGG, Archive::dopt, DUMP_COMPONENT_ACL, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, InvalidOid, parseOidArray(), pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), Archive::remoteVersion, res, and selectDumpableObject().
Referenced by getSchemaData().
Definition at line 7965 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), AssignDumpId(), atooid, _castInfo::castcontext, _castInfo::castfunc, _castInfo::castmethod, _castInfo::castsource, _castInfo::casttarget, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_CAST, _typeInfo::dobj, _castInfo::dobj, ExecuteSqlQuery(), findTypeByOid(), i, initPQExpBuffer(), _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), Archive::remoteVersion, res, selectDumpableCast(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 5515 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_COLLATION, _collInfo::dobj, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), res, _collInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 7137 of file pg_dump.c.
References addConstrChildIdxDeps(), appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _constraintInfo::condef, _constraintInfo::condeferrable, _constraintInfo::condeferred, _constraintInfo::condomain, _constraintInfo::confrelid, _constraintInfo::conindex, _constraintInfo::conislocal, _constraintInfo::contable, _constraintInfo::contype, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_FK_CONSTRAINT, _tableInfo::dobj, _indxInfo::dobj, _constraintInfo::dobj, DUMP_COMPONENT_DEFINITION, ExecuteSqlQuery(), findTableByOid(), i, _tableInfo::indexes, InvalidOid, j, PQExpBufferData::len, _dumpableObject::name, _tableInfo::numIndexes, _dumpableObject::objType, CatalogId::oid, pg_fatal, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), _tableInfo::relkind, Archive::remoteVersion, res, _constraintInfo::separate, CatalogId::tableoid, and tinfo.
Referenced by getSchemaData().
Definition at line 5583 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_CONVERSION, _convInfo::dobj, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), res, _convInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
DefaultACLInfo* getDefaultACLs | ( | Archive * | fout, |
int * | numDefaultACLs | ||
) |
Definition at line 9215 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _dumpableObject::components, createPQExpBuffer(), _defaultACLInfo::dacl, PQExpBufferData::data, _defaultACLInfo::defaclobjtype, _defaultACLInfo::defaclrole, destroyPQExpBuffer(), DO_DEFAULT_ACL, _defaultACLInfo::dobj, Archive::dopt, DUMP_COMPONENT_ACL, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, _dumpableAcl::initprivs, InvalidOid, _dumpableObject::name, nspid, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), _dumpableAcl::privtype, res, selectDumpableDefaultACL(), and CatalogId::tableoid.
Referenced by getSchemaData().
void getDumpableObjects | ( | DumpableObject *** | objs, |
int * | numObjs | ||
) |
Definition at line 711 of file common.c.
References allocedDumpIds, dumpIdMap, i, j, and pg_malloc_array.
Referenced by getTableDataFKConstraints(), and main().
EventTriggerInfo* getEventTriggers | ( | Archive * | fout, |
int * | numEventTriggers | ||
) |
Definition at line 7788 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_EVENT_TRIGGER, _evttriggerInfo::dobj, _evttriggerInfo::evtenabled, _evttriggerInfo::evtevent, _evttriggerInfo::evtfname, _evttriggerInfo::evtname, _evttriggerInfo::evtowner, _evttriggerInfo::evttags, ExecuteSqlQuery(), getRoleName(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), Archive::remoteVersion, res, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
void getExtendedStatistics | ( | Archive * | fout | ) |
Definition at line 7065 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_STATSEXT, _statsExtInfo::dobj, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), Archive::remoteVersion, res, _statsExtInfo::rolname, selectDumpableObject(), _statsExtInfo::stattarget, and CatalogId::tableoid.
Referenced by getSchemaData().
void getExtensionMembership | ( | Archive * | fout, |
ExtensionInfo | extinfo[], | ||
int | numExtensions | ||
) |
Definition at line 17506 of file pg_dump.c.
References appendPQExpBufferStr(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), _extensionInfo::dobj, ExecuteSqlQuery(), findExtensionByOid(), i, CatalogId::oid, pg_log_warning, PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), recordExtensionMembership(), res, and CatalogId::tableoid.
Referenced by getSchemaData().
ExtensionInfo* getExtensions | ( | Archive * | fout, |
int * | numExtensions | ||
) |
Definition at line 5196 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_EXTENSION, _extensionInfo::dobj, Archive::dopt, ExecuteSqlQuery(), _extensionInfo::extcondition, _extensionInfo::extconfig, _extensionInfo::extversion, i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), _extensionInfo::relocatable, res, selectDumpableExtension(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 9031 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _dumpableObject::components, createPQExpBuffer(), _fdwInfo::dacl, PQExpBufferData::data, destroyPQExpBuffer(), DO_FDW, _fdwInfo::dobj, DUMP_COMPONENT_ACL, ExecuteSqlQuery(), _fdwInfo::fdwhandler, _fdwInfo::fdwoptions, _fdwInfo::fdwvalidator, getRoleName(), i, _dumpableAcl::initprivs, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), _dumpableAcl::privtype, res, _fdwInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
ForeignServerInfo* getForeignServers | ( | Archive * | fout, |
int * | numForeignServers | ||
) |
Definition at line 9121 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _dumpableObject::components, createPQExpBuffer(), _foreignServerInfo::dacl, PQExpBufferData::data, destroyPQExpBuffer(), DO_FOREIGN_SERVER, _foreignServerInfo::dobj, DUMP_COMPONENT_ACL, DUMP_COMPONENT_USERMAP, ExecuteSqlQuery(), getRoleName(), i, _dumpableAcl::initprivs, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), _dumpableAcl::privtype, res, _foreignServerInfo::rolname, selectDumpableObject(), _foreignServerInfo::srvfdw, _foreignServerInfo::srvoptions, _foreignServerInfo::srvtype, _foreignServerInfo::srvversion, and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 6002 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), _funcInfo::argtypes, AssignDumpId(), atooid, _dumpOptions::binary_upgrade, _dumpableObject::catId, _dumpableObject::components, createPQExpBuffer(), _funcInfo::dacl, PQExpBufferData::data, destroyPQExpBuffer(), DO_FUNC, _funcInfo::dobj, Archive::dopt, DUMP_COMPONENT_ACL, ExecuteSqlQuery(), findNamespace(), g_last_builtin_oid, getRoleName(), i, _dumpableAcl::initprivs, _funcInfo::lang, _dumpableObject::name, _funcInfo::nargs, _dumpableObject::objType, CatalogId::oid, parseOidArray(), pg_malloc(), pg_malloc0(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), _dumpableAcl::privtype, _funcInfo::prorettype, Archive::remoteVersion, res, _funcInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 6755 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _constraintInfo::condef, _constraintInfo::condeferrable, _constraintInfo::condeferred, _constraintInfo::condomain, _constraintInfo::confrelid, _constraintInfo::conindex, _constraintInfo::conislocal, _constraintInfo::contable, _constraintInfo::contype, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_CONSTRAINT, DO_INDEX, _tableInfo::dobj, _indxInfo::dobj, _constraintInfo::dobj, _dumpableObject::dump, _dumpableObject::dumpId, ExecuteSqlQuery(), _tableInfo::hasindex, i, _indxInfo::indexconstraint, _indxInfo::indexdef, _tableInfo::indexes, _indxInfo::indextable, _indxInfo::indisclustered, _indxInfo::indisreplident, _indxInfo::indkeys, _indxInfo::indnattrs, _indxInfo::indnkeyattrs, _indxInfo::indnullsnotdistinct, _indxInfo::indreloptions, _indxInfo::indstatcols, _indxInfo::indstatvals, _tableInfo::interesting, InvalidOid, j, PQExpBufferData::len, _dumpableObject::name, _tableInfo::numIndexes, _dumpableObject::objType, CatalogId::oid, _indxInfo::parentidx, parseOidArray(), _indxInfo::partattaches, pg_fatal, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), Archive::remoteVersion, res, _constraintInfo::separate, CatalogId::tableoid, and _indxInfo::tablespace.
Referenced by getSchemaData().
Definition at line 6709 of file pg_dump.c.
References appendPQExpBufferStr(), atooid, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), ExecuteSqlQuery(), i, _inhInfo::inhparent, _inhInfo::inhrelid, pg_malloc(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), and res.
Referenced by getSchemaData().
DumpId getMaxDumpId | ( | void | ) |
Definition at line 668 of file common.c.
References lastDumpId.
Referenced by findDependencyLoops(), and TopoSort().
NamespaceInfo* getNamespaces | ( | Archive * | fout, |
int * | numNamespaces | ||
) |
Definition at line 5060 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, appendPGArray(), appendPQExpBufferChar(), appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _dumpableObject::components, createPQExpBuffer(), _namespaceInfo::dacl, PQExpBufferData::data, destroyPQExpBuffer(), DO_NAMESPACE, _namespaceInfo::dobj, DUMP_COMPONENT_ACL, ExecuteSqlQuery(), getRoleName(), i, _dumpableAcl::initprivs, _dumpableObject::name, _namespaceInfo::nspowner, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), _dumpableAcl::privtype, pstrdup(), quoteAclUserName(), res, resetPQExpBuffer(), _namespaceInfo::rolname, rolname, selectDumpableNamespace(), and CatalogId::tableoid.
Referenced by getSchemaData().
OpclassInfo* getOpclasses | ( | Archive * | fout, |
int * | numOpclasses | ||
) |
Definition at line 5722 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_OPCLASS, _opclassInfo::dobj, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), res, _opclassInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 5441 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_OPERATOR, _oprInfo::dobj, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, _oprInfo::oprcode, _oprInfo::oprkind, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), res, _oprInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
OpfamilyInfo* getOpfamilies | ( | Archive * | fout, |
int * | numOpfamilies | ||
) |
Definition at line 5788 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_OPFAMILY, _opfamilyInfo::dobj, ExecuteSqlQuery(), findNamespace(), getRoleName(), i, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), res, _opfamilyInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 6646 of file pg_dump.c.
References _dumpableObject::catId, _tableInfo::dobj, _dumpableObject::dump, DUMP_COMPONENT_NONE, findTableByOid(), i, _tableInfo::interesting, _tableInfo::is_identity_sequence, CatalogId::oid, OidIsValid, _tableInfo::owning_tab, and pg_fatal.
Referenced by getSchemaData().
Definition at line 3652 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _dumpableObject::components, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_POLICY, _tableInfo::dobj, _policyInfo::dobj, _dumpableObject::dump, DUMP_COMPONENT_POLICY, ExecuteSqlQuery(), findTableByOid(), i, j, PQExpBufferData::len, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_log_info, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, _policyInfo::polcmd, _policyInfo::polname, _policyInfo::polpermissive, _policyInfo::polqual, _policyInfo::polroles, _policyInfo::poltable, _policyInfo::polwithcheck, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), printfPQExpBuffer(), _tableInfo::relkind, Archive::remoteVersion, res, _tableInfo::rowsec, and CatalogId::tableoid.
Referenced by getSchemaData().
ProcLangInfo* getProcLangs | ( | Archive * | fout, |
int * | numProcLangs | ||
) |
Definition at line 7875 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, _dumpableObject::components, createPQExpBuffer(), _procLangInfo::dacl, PQExpBufferData::data, destroyPQExpBuffer(), DO_PROCLANG, _procLangInfo::dobj, DUMP_COMPONENT_ACL, ExecuteSqlQuery(), getRoleName(), i, _dumpableAcl::initprivs, _procLangInfo::laninline, _procLangInfo::lanowner, _procLangInfo::lanplcallfoid, _procLangInfo::lanpltrusted, _procLangInfo::lanvalidator, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), _dumpableAcl::privtype, res, selectDumpableProcLang(), and CatalogId::tableoid.
Referenced by getSchemaData().
void getPublicationNamespaces | ( | Archive * | fout | ) |
Definition at line 4137 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_PUBLICATION_TABLE_IN_SCHEMA, _namespaceInfo::dobj, _PublicationSchemaInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_NONE, ExecuteSqlQuery(), findNamespaceByOid(), findPublicationByOid(), i, j, _dumpableObject::name, _dumpOptions::no_publications, _dumpableObject::objType, CatalogId::oid, pg_malloc(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), _PublicationSchemaInfo::publication, _PublicationSchemaInfo::pubschema, Archive::remoteVersion, res, selectDumpablePublicationObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
PublicationInfo* getPublications | ( | Archive * | fout, |
int * | numPublications | ||
) |
Definition at line 3937 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_PUBLICATION, _PublicationInfo::dobj, Archive::dopt, ExecuteSqlQuery(), getRoleName(), i, _dumpableObject::name, _dumpOptions::no_publications, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), _PublicationInfo::puballtables, _PublicationInfo::pubdelete, _PublicationInfo::pubinsert, _PublicationInfo::pubtruncate, _PublicationInfo::pubupdate, _PublicationInfo::pubviaroot, Archive::remoteVersion, res, resetPQExpBuffer(), _PublicationInfo::rolname, selectDumpableObject(), and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 4224 of file pg_dump.c.
References appendPQExpBufferStr(), AssignDumpId(), atooid, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_PUBLICATION_REL, _tableInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_DEFINITION, ExecuteSqlQuery(), findPublicationByOid(), findTableByOid(), fmtId(), i, j, _dumpableObject::name, _dumpOptions::no_publications, parsePGArray(), pg_fatal, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), Archive::remoteVersion, res, and selectDumpablePublicationObject().
Referenced by getSchemaData().
Definition at line 7417 of file pg_dump.c.
References addObjectDependency(), appendPQExpBufferStr(), AssignDumpId(), atooid, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_RULE, _tableInfo::dobj, _ruleInfo::dobj, _dumpableObject::dump, _dumpableObject::dumpId, _ruleInfo::ev_enabled, _ruleInfo::ev_type, ExecuteSqlQuery(), findTableByOid(), i, _ruleInfo::is_instead, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, pg_fatal, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), _tableInfo::relkind, res, _ruleInfo::ruletable, _ruleInfo::separate, and CatalogId::tableoid.
Referenced by getSchemaData().
Definition at line 97 of file common.c.