#include "postgres_fe.h"
#include "catalog/pg_class_d.h"
#include "common/int.h"
#include "lib/binaryheap.h"
#include "pg_backup_utils.h"
#include "pg_dump.h"
Go to the source code of this file.
Definition at line 54 of file pg_dump_sort.c.
Definition at line 517 of file pg_dump_sort.c.
References Assert(), _accessMethodInfo::dobj, findAccessMethodByOid(), and _dumpableObject::name.
Referenced by DOTypeNameCompare().
Definition at line 1502 of file pg_dump_sort.c.
References buf, bufsize, _dumpableObject::catId, DO_ACCESS_METHOD, DO_AGG, DO_ATTRDEF, DO_CAST, DO_COLLATION, DO_CONSTRAINT, DO_CONVERSION, DO_DEFAULT_ACL, DO_DUMMY_TYPE, DO_EVENT_TRIGGER, DO_EXTENSION, DO_FDW, DO_FK_CONSTRAINT, DO_FOREIGN_SERVER, DO_FUNC, DO_INDEX, DO_INDEX_ATTACH, DO_LARGE_OBJECT, DO_LARGE_OBJECT_DATA, DO_NAMESPACE, DO_OPCLASS, DO_OPERATOR, DO_OPFAMILY, DO_POLICY, DO_POST_DATA_BOUNDARY, DO_PRE_DATA_BOUNDARY, DO_PROCLANG, DO_PUBLICATION, DO_PUBLICATION_REL, DO_PUBLICATION_TABLE_IN_SCHEMA, DO_REFRESH_MATVIEW, DO_REL_STATS, DO_RULE, DO_SEQUENCE_SET, DO_SHELL_TYPE, DO_STATSEXT, DO_SUBSCRIPTION, DO_SUBSCRIPTION_REL, DO_TABLE, DO_TABLE_ATTACH, DO_TABLE_DATA, DO_TRANSFORM, DO_TRIGGER, DO_TSCONFIG, DO_TSDICT, DO_TSPARSER, DO_TSTEMPLATE, DO_TYPE, _dumpableObject::dumpId, _dumpableObject::name, _dumpableObject::objType, CatalogId::oid, and snprintf.
Referenced by repairDependencyLoop().
Definition at line 200 of file pg_dump_sort.c.
References accessMethodNameCompare(), _attrDefInfo::adnum, _funcInfo::argtypes, Assert(), _dumpableObject::catId, _collInfo::collencoding, _constraintInfo::condomain, _constraintInfo::contable, dbObjectTypePriority, _defaultACLInfo::defaclrole, DO_AGG, DO_ATTRDEF, DO_COLLATION, DO_CONSTRAINT, DO_DEFAULT_ACL, DO_FUNC, DO_OPCLASS, DO_OPERATOR, DO_OPFAMILY, DO_POLICY, DO_PUBLICATION_REL, DO_PUBLICATION_TABLE_IN_SCHEMA, DO_RULE, DO_TRIGGER, _typeInfo::dobj, _tableInfo::dobj, _PublicationInfo::dobj, i, _dumpableObject::name, _funcInfo::nargs, _dumpableObject::objType, CatalogId::oid, oidcmp, _opclassInfo::opcmethod, _opfamilyInfo::opfmethod, _oprInfo::oprkind, _oprInfo::oprleft, _oprInfo::oprright, pgTypeNameCompare(), _policyInfo::poltable, PRIO_TABLE, PRIO_TYPE, _PublicationSchemaInfo::publication, _ruleInfo::ruletable, and _triggerInfo::tgtable.
Referenced by sortDumpableObjectsByTypeName().
Definition at line 748 of file pg_dump_sort.c.
References _dumpableObject::dumpId, findLoop(), free, getMaxDumpId(), i, j, pg_fatal, pg_malloc(), pg_malloc0(), and repairDependencyLoop().
Referenced by sortDumpableObjects().
Definition at line 844 of file pg_dump_sort.c.
References _dumpableObject::dependencies, _dumpableObject::dumpId, findLoop(), findObjectByDumpId(), i, and _dumpableObject::nDeps.
Referenced by findDependencyLoops(), and findLoop().
Definition at line 1762 of file pg_dump_sort.c.
References a, b, and pg_cmp_s32().
Referenced by TopoSort().
Definition at line 473 of file pg_dump_sort.c.
References Assert(), _typeInfo::dobj, findTypeByOid(), and _dumpableObject::name.
Referenced by DOTypeNameCompare().
Definition at line 1162 of file pg_dump_sort.c.
References buf, describeDumpableObject(), DO_ATTRDEF, DO_CONSTRAINT, DO_FUNC, DO_INDEX, DO_POST_DATA_BOUNDARY, DO_PRE_DATA_BOUNDARY, DO_REL_STATS, DO_RULE, DO_TABLE, DO_TABLE_DATA, DO_TYPE, i, j, name, ngettext, pg_log_warning, pg_log_warning_detail, pg_log_warning_hint, removeObjectDependency(), repairDomainConstraintLoop(), repairDomainConstraintMultiLoop(), repairFunctionBoundaryMultiLoop(), repairIndexLoop(), repairMatViewBoundaryMultiLoop(), repairTableAttrDefLoop(), repairTableAttrDefMultiLoop(), repairTableConstraintLoop(), repairTableConstraintMultiLoop(), repairTypeFuncLoop(), repairViewRuleLoop(), and repairViewRuleMultiLoop().
Referenced by findDependencyLoops().
Definition at line 1126 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 1134 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, postDataBoundId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 1048 of file pg_dump_sort.c.
References DO_FUNC, _dumpableObject::dumpId, _dumpableObject::objType, _funcInfo::postponed_def, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 1148 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 1014 of file pg_dump_sort.c.
References DO_REL_STATS, DO_TABLE, _dumpableObject::dumpId, _dumpableObject::objType, _tableInfo::postponed_def, _tableInfo::relkind, _relStatsInfo::relkind, removeObjectDependency(), _relStatsInfo::section, and SECTION_POST_DATA.
Referenced by repairDependencyLoop().
Definition at line 1103 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 1111 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 1069 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 1086 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, postDataBoundId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 929 of file pg_dump_sort.c.
References addObjectDependency(), _shellTypeInfo::dobj, _dumpableObject::dump, DUMP_COMPONENT_DEFINITION, _dumpableObject::dumpId, removeObjectDependency(), and _typeInfo::shellType.
Referenced by repairDependencyLoop().
Definition at line 960 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
Definition at line 980 of file pg_dump_sort.c.
References addObjectDependency(), _tableInfo::dummy_view, _dumpableObject::dumpId, postDataBoundId, removeObjectDependency(), and _ruleInfo::separate.
Referenced by repairDependencyLoop().
Definition at line 547 of file pg_dump_sort.c.
References findDependencyLoops(), free, pg_malloc(), postDataBoundId, preDataBoundId, and TopoSort().
Referenced by main().
Definition at line 192 of file pg_dump_sort.c.
References DOTypeNameCompare(), and qsort.
Referenced by main().
Definition at line 599 of file pg_dump_sort.c.
References beforeConstraints, binaryheap_add(), binaryheap_add_unordered(), binaryheap_allocate(), binaryheap_build(), binaryheap_empty, binaryheap_free(), binaryheap_remove_first(), _dumpableObject::dependencies, _dumpableObject::dumpId, free, getMaxDumpId(), i, int_cmp(), j, _dumpableObject::nDeps, pg_fatal, pg_malloc(), and pg_malloc0().
Referenced by sortDumpableObjects().
Definition at line 105 of file pg_dump_sort.c.
Referenced by DOTypeNameCompare().
Definition at line 161 of file pg_dump_sort.c.
Referenced by repairDomainConstraintMultiLoop(), repairTableConstraintMultiLoop(), repairViewRuleMultiLoop(), and sortDumpableObjects().
Definition at line 160 of file pg_dump_sort.c.
Referenced by sortDumpableObjects().