|
PostgreSQL Source Code git master
|
#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.
Variables | |
| static const int | dbObjectTypePriority [] |
| static DumpId | preDataBoundId |
| static DumpId | postDataBoundId |
Definition at line 54 of file pg_dump_sort.c.
Definition at line 518 of file pg_dump_sort.c.
References Assert(), _accessMethodInfo::dobj, findAccessMethodByOid(), and _dumpableObject::name.
Referenced by DOTypeNameCompare().
|
static |
Definition at line 1503 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().
|
static |
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_FK_CONSTRAINT, 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().
|
static |
Definition at line 749 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().
|
static |
Definition at line 845 of file pg_dump_sort.c.
References _dumpableObject::dependencies, _dumpableObject::dumpId, findLoop(), findObjectByDumpId(), i, and _dumpableObject::nDeps.
Referenced by findDependencyLoops(), and findLoop().
|
static |
Definition at line 1763 of file pg_dump_sort.c.
References a, b, and pg_cmp_s32().
Referenced by TopoSort().
Definition at line 474 of file pg_dump_sort.c.
References Assert(), _typeInfo::dobj, findTypeByOid(), and _dumpableObject::name.
Referenced by DOTypeNameCompare().
|
static |
Definition at line 1163 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().
|
static |
Definition at line 1127 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 1135 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, postDataBoundId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 1049 of file pg_dump_sort.c.
References DO_FUNC, _dumpableObject::dumpId, _dumpableObject::objType, _funcInfo::postponed_def, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 1149 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 1015 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().
|
static |
Definition at line 1104 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 1112 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 1070 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 1087 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, postDataBoundId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 930 of file pg_dump_sort.c.
References addObjectDependency(), _shellTypeInfo::dobj, _dumpableObject::dump, DUMP_COMPONENT_DEFINITION, _dumpableObject::dumpId, removeObjectDependency(), and _typeInfo::shellType.
Referenced by repairDependencyLoop().
|
static |
Definition at line 961 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 981 of file pg_dump_sort.c.
References addObjectDependency(), _tableInfo::dummy_view, _dumpableObject::dumpId, postDataBoundId, removeObjectDependency(), and _ruleInfo::separate.
Referenced by repairDependencyLoop().
| void sortDumpableObjects | ( | DumpableObject ** | objs, |
| int | numObjs, | ||
| DumpId | preBoundaryId, | ||
| DumpId | postBoundaryId | ||
| ) |
Definition at line 548 of file pg_dump_sort.c.
References findDependencyLoops(), free, pg_malloc(), postDataBoundId, preDataBoundId, and TopoSort().
Referenced by main().
| void sortDumpableObjectsByTypeName | ( | DumpableObject ** | objs, |
| int | numObjs | ||
| ) |
Definition at line 192 of file pg_dump_sort.c.
References DOTypeNameCompare(), and qsort.
Referenced by main().
| StaticAssertDecl | ( | lengthof(dbObjectTypePriority) | = =NUM_DUMPABLE_OBJECT_TYPES, |
| "array length mismatch" | |||
| ) |
|
static |
Definition at line 600 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().
|
static |
Definition at line 105 of file pg_dump_sort.c.
Referenced by DOTypeNameCompare().
|
static |
Definition at line 161 of file pg_dump_sort.c.
Referenced by repairDomainConstraintMultiLoop(), repairTableConstraintMultiLoop(), repairViewRuleMultiLoop(), and sortDumpableObjects().
|
static |
Definition at line 160 of file pg_dump_sort.c.
Referenced by sortDumpableObjects().