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.
|
static |
Definition at line 1258 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_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 196 of file pg_dump_sort.c.
References _attrDefInfo::adnum, _funcInfo::argtypes, _dumpableObject::catId, dbObjectTypePriority, DO_AGG, DO_ATTRDEF, DO_FUNC, DO_OPERATOR, DO_POLICY, DO_RULE, DO_TRIGGER, _typeInfo::dobj, _tableInfo::dobj, findTypeByOid(), i, _dumpableObject::name, _funcInfo::nargs, _dumpableObject::objType, CatalogId::oid, oidcmp, _oprInfo::oprkind, p2, _policyInfo::poltable, _ruleInfo::ruletable, and _triggerInfo::tgtable.
Referenced by sortDumpableObjectsByTypeName().
|
static |
Definition at line 533 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 629 of file pg_dump_sort.c.
References _dumpableObject::dependencies, _dumpableObject::dumpId, findObjectByDumpId(), i, and _dumpableObject::nDeps.
Referenced by findDependencyLoops().
|
static |
Definition at line 1513 of file pg_dump_sort.c.
References a, b, and pg_cmp_s32().
Referenced by TopoSort().
|
static |
Definition at line 936 of file pg_dump_sort.c.
References buf, describeDumpableObject(), DO_ATTRDEF, DO_CONSTRAINT, DO_FUNC, DO_INDEX, DO_PRE_DATA_BOUNDARY, 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 900 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 908 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, postDataBoundId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 822 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 922 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 799 of file pg_dump_sort.c.
References DO_TABLE, _dumpableObject::dumpId, _dumpableObject::objType, _tableInfo::postponed_def, _tableInfo::relkind, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 877 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 885 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 843 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 860 of file pg_dump_sort.c.
References addObjectDependency(), _dumpableObject::dumpId, postDataBoundId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 714 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 745 of file pg_dump_sort.c.
References _dumpableObject::dumpId, and removeObjectDependency().
Referenced by repairDependencyLoop().
|
static |
Definition at line 765 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 332 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 188 of file pg_dump_sort.c.
References DOTypeNameCompare(), and qsort.
Referenced by main().
StaticAssertDecl | ( | lengthof(dbObjectTypePriority) | = =(DO_SUBSCRIPTION_REL+1) , |
"array length mismatch" | |||
) |
|
static |
Definition at line 384 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 104 of file pg_dump_sort.c.
Referenced by DOTypeNameCompare().
|
static |
Definition at line 159 of file pg_dump_sort.c.
Referenced by repairDomainConstraintMultiLoop(), repairTableConstraintMultiLoop(), repairViewRuleMultiLoop(), and sortDumpableObjects().
|
static |
Definition at line 158 of file pg_dump_sort.c.
Referenced by sortDumpableObjects().