PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
common.c File Reference
#include "postgres_fe.h"
#include "pg_backup_archiver.h"
#include "pg_backup_utils.h"
#include "pg_dump.h"
#include <ctype.h>
#include "catalog/pg_class.h"
#include "fe_utils/string_utils.h"
Include dependency graph for common.c:

Go to the source code of this file.

Functions

static void flagInhTables (TableInfo *tbinfo, int numTables, InhInfo *inhinfo, int numInherits)
 
static void flagInhAttrs (DumpOptions *dopt, TableInfo *tblinfo, int numTables)
 
static DumpableObject ** buildIndexArray (void *objArray, int numObjs, Size objSize)
 
static int DOCatalogIdCompare (const void *p1, const void *p2)
 
static int ExtensionMemberIdCompare (const void *p1, const void *p2)
 
static void findParentsByOid (TableInfo *self, InhInfo *inhinfo, int numInherits)
 
static int strInArray (const char *pattern, char **arr, int arr_size)
 
TableInfogetSchemaData (Archive *fout, int *numTablesPtr)
 
void AssignDumpId (DumpableObject *dobj)
 
DumpId createDumpId (void)
 
DumpId getMaxDumpId (void)
 
DumpableObjectfindObjectByDumpId (DumpId dumpId)
 
DumpableObjectfindObjectByCatalogId (CatalogId catalogId)
 
static DumpableObjectfindObjectByOid (Oid oid, DumpableObject **indexArray, int numObjs)
 
void getDumpableObjects (DumpableObject ***objs, int *numObjs)
 
void addObjectDependency (DumpableObject *dobj, DumpId refId)
 
void removeObjectDependency (DumpableObject *dobj, DumpId refId)
 
TableInfofindTableByOid (Oid oid)
 
TypeInfofindTypeByOid (Oid oid)
 
FuncInfofindFuncByOid (Oid oid)
 
OprInfofindOprByOid (Oid oid)
 
CollInfofindCollationByOid (Oid oid)
 
NamespaceInfofindNamespaceByOid (Oid oid)
 
ExtensionInfofindExtensionByOid (Oid oid)
 
void setExtensionMembership (ExtensionMemberId *extmems, int nextmems)
 
ExtensionInfofindOwningExtension (CatalogId catalogId)
 
void parseOidArray (const char *str, Oid *array, int arraysize)
 

Variables

static DumpableObject ** dumpIdMap = NULL
 
static int allocedDumpIds = 0
 
static DumpId lastDumpId = 0
 
static bool catalogIdMapValid = false
 
static DumpableObject ** catalogIdMap = NULL
 
static int numCatalogIds = 0
 
static DumpableObject ** tblinfoindex
 
static DumpableObject ** typinfoindex
 
static DumpableObject ** funinfoindex
 
static DumpableObject ** oprinfoindex
 
static DumpableObject ** collinfoindex
 
static DumpableObject ** nspinfoindex
 
static DumpableObject ** extinfoindex
 
static int numTables
 
static int numTypes
 
static int numFuncs
 
static int numOperators
 
static int numCollations
 
static int numNamespaces
 
static int numExtensions
 
static ExtensionMemberIdextmembers
 
static int numextmembers
 

Function Documentation

void addObjectDependency ( DumpableObject dobj,
DumpId  refId 
)

Definition at line 693 of file common.c.

References _dumpableObject::allocDeps, _dumpableObject::dependencies, _dumpableObject::nDeps, pg_malloc(), and pg_realloc().

Referenced by addBoundaryDependencies(), buildMatViewRefreshDependencies(), checkExtensionMembership(), flagInhAttrs(), getDependencies(), getDomainConstraints(), getRules(), getTableAttrs(), getTableDataFKConstraints(), makeTableDataInfo(), processExtensionTables(), repairDomainConstraintMultiLoop(), repairTableAttrDefMultiLoop(), repairTableConstraintMultiLoop(), repairTypeFuncLoop(), and repairViewRuleMultiLoop().

694 {
695  if (dobj->nDeps >= dobj->allocDeps)
696  {
697  if (dobj->allocDeps <= 0)
698  {
699  dobj->allocDeps = 16;
700  dobj->dependencies = (DumpId *)
701  pg_malloc(dobj->allocDeps * sizeof(DumpId));
702  }
703  else
704  {
705  dobj->allocDeps *= 2;
706  dobj->dependencies = (DumpId *)
707  pg_realloc(dobj->dependencies,
708  dobj->allocDeps * sizeof(DumpId));
709  }
710  }
711  dobj->dependencies[dobj->nDeps++] = refId;
712 }
int DumpId
Definition: pg_backup.h:229
DumpId * dependencies
Definition: pg_dump.h:138
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
void * pg_realloc(void *ptr, size_t size)
Definition: fe_memutils.c:65
void AssignDumpId ( DumpableObject dobj)

Definition at line 457 of file common.c.

References _dumpableObject::allocDeps, allocedDumpIds, catalogIdMapValid, _dumpableObject::dependencies, _dumpableObject::dump, DUMP_COMPONENT_ALL, _dumpableObject::dumpId, _dumpableObject::ext_member, lastDumpId, _dumpableObject::name, _dumpableObject::nDeps, NULL, pg_malloc(), and pg_realloc().

Referenced by createBoundaryObjects(), flagInhAttrs(), getAccessMethods(), getAggregates(), getBlobs(), getCasts(), getCollations(), getConstraints(), getConversions(), getDefaultACLs(), getDomainConstraints(), getEventTriggers(), getExtendedStatistics(), getExtensions(), getForeignDataWrappers(), getForeignServers(), getFuncs(), getIndexes(), getNamespaces(), getOpclasses(), getOperators(), getOpfamilies(), getPolicies(), getProcLangs(), getPublications(), getPublicationTables(), getRules(), getSubscriptions(), getTableAttrs(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), and makeTableDataInfo().

458 {
459  dobj->dumpId = ++lastDumpId;
460  dobj->name = NULL; /* must be set later */
461  dobj->namespace = NULL; /* may be set later */
462  dobj->dump = DUMP_COMPONENT_ALL; /* default assumption */
463  dobj->ext_member = false; /* default assumption */
464  dobj->dependencies = NULL;
465  dobj->nDeps = 0;
466  dobj->allocDeps = 0;
467 
468  while (dobj->dumpId >= allocedDumpIds)
469  {
470  int newAlloc;
471 
472  if (allocedDumpIds <= 0)
473  {
474  newAlloc = 256;
476  pg_malloc(newAlloc * sizeof(DumpableObject *));
477  }
478  else
479  {
480  newAlloc = allocedDumpIds * 2;
482  pg_realloc(dumpIdMap, newAlloc * sizeof(DumpableObject *));
483  }
484  memset(dumpIdMap + allocedDumpIds, 0,
485  (newAlloc - allocedDumpIds) * sizeof(DumpableObject *));
486  allocedDumpIds = newAlloc;
487  }
488  dumpIdMap[dobj->dumpId] = dobj;
489 
490  /* mark catalogIdMap invalid, but don't rebuild it yet */
491  catalogIdMapValid = false;
492 }
char * name
Definition: pg_dump.h:133
static int allocedDumpIds
Definition: common.c:32
DumpComponents dump
Definition: pg_dump.h:134
static DumpId lastDumpId
Definition: common.c:33
static DumpableObject ** dumpIdMap
Definition: common.c:31
DumpId * dependencies
Definition: pg_dump.h:138
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
DumpId dumpId
Definition: pg_dump.h:132
bool ext_member
Definition: pg_dump.h:137
void * pg_realloc(void *ptr, size_t size)
Definition: fe_memutils.c:65
#define NULL
Definition: c.h:229
static bool catalogIdMapValid
Definition: common.c:38
#define DUMP_COMPONENT_ALL
Definition: pg_dump.h:99
static DumpableObject ** buildIndexArray ( void *  objArray,
int  numObjs,
Size  objSize 
)
static

Definition at line 628 of file common.c.

References DOCatalogIdCompare(), i, pg_malloc(), and qsort.

Referenced by getSchemaData().

629 {
630  DumpableObject **ptrs;
631  int i;
632 
633  ptrs = (DumpableObject **) pg_malloc(numObjs * sizeof(DumpableObject *));
634  for (i = 0; i < numObjs; i++)
635  ptrs[i] = (DumpableObject *) ((char *) objArray + i * objSize);
636 
637  /* We can use DOCatalogIdCompare to sort since its first key is OID */
638  if (numObjs > 1)
639  qsort((void *) ptrs, numObjs, sizeof(DumpableObject *),
641 
642  return ptrs;
643 }
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
static int DOCatalogIdCompare(const void *p1, const void *p2)
Definition: common.c:649
int i
#define qsort(a, b, c, d)
Definition: port.h:443
DumpId createDumpId ( void  )
static int DOCatalogIdCompare ( const void *  p1,
const void *  p2 
)
static

Definition at line 649 of file common.c.

References _dumpableObject::catId, CatalogId::oid, oidcmp, and CatalogId::tableoid.

Referenced by buildIndexArray(), and findObjectByCatalogId().

650 {
651  const DumpableObject *obj1 = *(DumpableObject *const *) p1;
652  const DumpableObject *obj2 = *(DumpableObject *const *) p2;
653  int cmpval;
654 
655  /*
656  * Compare OID first since it's usually unique, whereas there will only be
657  * a few distinct values of tableoid.
658  */
659  cmpval = oidcmp(obj1->catId.oid, obj2->catId.oid);
660  if (cmpval == 0)
661  cmpval = oidcmp(obj1->catId.tableoid, obj2->catId.tableoid);
662  return cmpval;
663 }
Oid tableoid
Definition: pg_backup.h:225
#define oidcmp(x, y)
Definition: pg_dump.h:20
CatalogId catId
Definition: pg_dump.h:131
static int ExtensionMemberIdCompare ( const void *  p1,
const void *  p2 
)
static

Definition at line 871 of file common.c.

References _extensionMemberId::catId, CatalogId::oid, oidcmp, and CatalogId::tableoid.

Referenced by setExtensionMembership().

872 {
873  const ExtensionMemberId *obj1 = (const ExtensionMemberId *) p1;
874  const ExtensionMemberId *obj2 = (const ExtensionMemberId *) p2;
875  int cmpval;
876 
877  /*
878  * Compare OID first since it's usually unique, whereas there will only be
879  * a few distinct values of tableoid.
880  */
881  cmpval = oidcmp(obj1->catId.oid, obj2->catId.oid);
882  if (cmpval == 0)
883  cmpval = oidcmp(obj1->catId.tableoid, obj2->catId.tableoid);
884  return cmpval;
885 }
Oid tableoid
Definition: pg_backup.h:225
#define oidcmp(x, y)
Definition: pg_dump.h:20
CatalogId catId
Definition: pg_dump.h:620
CollInfo* findCollationByOid ( Oid  oid)

Definition at line 784 of file common.c.

References findObjectByOid(), and numCollations.

Referenced by createDummyViewAsClause(), dumpCompositeType(), dumpDomain(), dumpRangeType(), and dumpTableSchema().

785 {
787 }
static DumpableObject ** collinfoindex
Definition: common.c:54
static DumpableObject * findObjectByOid(Oid oid, DumpableObject **indexArray, int numObjs)
Definition: common.c:590
static int numCollations
Definition: common.c:61
ExtensionInfo* findExtensionByOid ( Oid  oid)

Definition at line 806 of file common.c.

References findObjectByOid(), and numExtensions.

Referenced by getExtensionMembership().

807 {
809 }
static DumpableObject * findObjectByOid(Oid oid, DumpableObject **indexArray, int numObjs)
Definition: common.c:590
static int numExtensions
Definition: common.c:63
static DumpableObject ** extinfoindex
Definition: common.c:56
FuncInfo* findFuncByOid ( Oid  oid)

Definition at line 762 of file common.c.

References findObjectByOid(), and numFuncs.

Referenced by dumpCast(), dumpProcLang(), and dumpTransform().

763 {
764  return (FuncInfo *) findObjectByOid(oid, funinfoindex, numFuncs);
765 }
static int numFuncs
Definition: common.c:59
static DumpableObject * findObjectByOid(Oid oid, DumpableObject **indexArray, int numObjs)
Definition: common.c:590
static DumpableObject ** funinfoindex
Definition: common.c:52
NamespaceInfo* findNamespaceByOid ( Oid  oid)

Definition at line 795 of file common.c.

References findObjectByOid(), and numNamespaces.

Referenced by findNamespace().

796 {
798 }
static DumpableObject * findObjectByOid(Oid oid, DumpableObject **indexArray, int numObjs)
Definition: common.c:590
static int numNamespaces
Definition: common.c:62
static DumpableObject ** nspinfoindex
Definition: common.c:55
DumpableObject* findObjectByCatalogId ( CatalogId  catalogId)

Definition at line 539 of file common.c.

References catalogIdMap, catalogIdMapValid, difference(), DOCatalogIdCompare(), free, getDumpableObjects(), NULL, numCatalogIds, CatalogId::oid, oidcmp, qsort, and CatalogId::tableoid.

Referenced by buildMatViewRefreshDependencies(), and getDependencies().

540 {
541  DumpableObject **low;
542  DumpableObject **high;
543 
544  if (!catalogIdMapValid)
545  {
546  if (catalogIdMap)
549  if (numCatalogIds > 1)
550  qsort((void *) catalogIdMap, numCatalogIds,
552  catalogIdMapValid = true;
553  }
554 
555  /*
556  * We could use bsearch() here, but the notational cruft of calling
557  * bsearch is nearly as bad as doing it ourselves; and the generalized
558  * bsearch function is noticeably slower as well.
559  */
560  if (numCatalogIds <= 0)
561  return NULL;
562  low = catalogIdMap;
563  high = catalogIdMap + (numCatalogIds - 1);
564  while (low <= high)
565  {
566  DumpableObject **middle;
567  int difference;
568 
569  middle = low + (high - low) / 2;
570  /* comparison must match DOCatalogIdCompare, below */
571  difference = oidcmp((*middle)->catId.oid, catalogId.oid);
572  if (difference == 0)
573  difference = oidcmp((*middle)->catId.tableoid, catalogId.tableoid);
574  if (difference == 0)
575  return *middle;
576  else if (difference < 0)
577  low = middle + 1;
578  else
579  high = middle - 1;
580  }
581  return NULL;
582 }
Oid tableoid
Definition: pg_backup.h:225
#define oidcmp(x, y)
Definition: pg_dump.h:20
static int DOCatalogIdCompare(const void *p1, const void *p2)
Definition: common.c:649
static int numCatalogIds
Definition: common.c:40
Datum difference(PG_FUNCTION_ARGS)
#define free(a)
Definition: header.h:65
#define NULL
Definition: c.h:229
static DumpableObject ** catalogIdMap
Definition: common.c:39
static bool catalogIdMapValid
Definition: common.c:38
#define qsort(a, b, c, d)
Definition: port.h:443
void getDumpableObjects(DumpableObject ***objs, int *numObjs)
Definition: common.c:671
DumpableObject* findObjectByDumpId ( DumpId  dumpId)

Definition at line 521 of file common.c.

References allocedDumpIds, and NULL.

Referenced by binary_upgrade_extension_member(), BuildArchiveDependencies(), dumpConstraint(), dumpExtension(), findDumpableDependencies(), and findLoop().

522 {
523  if (dumpId <= 0 || dumpId >= allocedDumpIds)
524  return NULL; /* out of range? */
525  return dumpIdMap[dumpId];
526 }
static int allocedDumpIds
Definition: common.c:32
static DumpableObject ** dumpIdMap
Definition: common.c:31
#define NULL
Definition: c.h:229
static DumpableObject* findObjectByOid ( Oid  oid,
DumpableObject **  indexArray,
int  numObjs 
)
static

Definition at line 590 of file common.c.

References difference(), NULL, and oidcmp.

Referenced by findCollationByOid(), findExtensionByOid(), findFuncByOid(), findNamespaceByOid(), findOprByOid(), findTableByOid(), and findTypeByOid().

591 {
592  DumpableObject **low;
593  DumpableObject **high;
594 
595  /*
596  * This is the same as findObjectByCatalogId except we assume we need not
597  * look at table OID because the objects are all the same type.
598  *
599  * We could use bsearch() here, but the notational cruft of calling
600  * bsearch is nearly as bad as doing it ourselves; and the generalized
601  * bsearch function is noticeably slower as well.
602  */
603  if (numObjs <= 0)
604  return NULL;
605  low = indexArray;
606  high = indexArray + (numObjs - 1);
607  while (low <= high)
608  {
609  DumpableObject **middle;
610  int difference;
611 
612  middle = low + (high - low) / 2;
613  difference = oidcmp((*middle)->catId.oid, oid);
614  if (difference == 0)
615  return *middle;
616  else if (difference < 0)
617  low = middle + 1;
618  else
619  high = middle - 1;
620  }
621  return NULL;
622 }
#define oidcmp(x, y)
Definition: pg_dump.h:20
Datum difference(PG_FUNCTION_ARGS)
#define NULL
Definition: c.h:229
OprInfo* findOprByOid ( Oid  oid)

Definition at line 773 of file common.c.

References findObjectByOid(), and numOperators.

774 {
776 }
static DumpableObject ** oprinfoindex
Definition: common.c:53
static DumpableObject * findObjectByOid(Oid oid, DumpableObject **indexArray, int numObjs)
Definition: common.c:590
static int numOperators
Definition: common.c:60
ExtensionInfo* findOwningExtension ( CatalogId  catalogId)

Definition at line 833 of file common.c.

References _extensionMemberId::catId, difference(), _extensionMemberId::ext, extmembers, NULL, numextmembers, CatalogId::oid, oidcmp, and CatalogId::tableoid.

Referenced by checkExtensionMembership().

834 {
835  ExtensionMemberId *low;
836  ExtensionMemberId *high;
837 
838  /*
839  * We could use bsearch() here, but the notational cruft of calling
840  * bsearch is nearly as bad as doing it ourselves; and the generalized
841  * bsearch function is noticeably slower as well.
842  */
843  if (numextmembers <= 0)
844  return NULL;
845  low = extmembers;
846  high = extmembers + (numextmembers - 1);
847  while (low <= high)
848  {
849  ExtensionMemberId *middle;
850  int difference;
851 
852  middle = low + (high - low) / 2;
853  /* comparison must match ExtensionMemberIdCompare, below */
854  difference = oidcmp(middle->catId.oid, catalogId.oid);
855  if (difference == 0)
856  difference = oidcmp(middle->catId.tableoid, catalogId.tableoid);
857  if (difference == 0)
858  return middle->ext;
859  else if (difference < 0)
860  low = middle + 1;
861  else
862  high = middle - 1;
863  }
864  return NULL;
865 }
ExtensionInfo * ext
Definition: pg_dump.h:621
Oid tableoid
Definition: pg_backup.h:225
#define oidcmp(x, y)
Definition: pg_dump.h:20
Datum difference(PG_FUNCTION_ARGS)
static ExtensionMemberId * extmembers
Definition: common.c:66
#define NULL
Definition: c.h:229
static int numextmembers
Definition: common.c:67
CatalogId catId
Definition: pg_dump.h:620
static void findParentsByOid ( TableInfo self,
InhInfo inhinfo,
int  numInherits 
)
static

Definition at line 893 of file common.c.

References exit_nicely, findTableByOid(), i, NULL, _tableInfo::parents, pg_malloc(), and write_msg().

Referenced by flagInhTables().

895 {
896  Oid oid = self->dobj.catId.oid;
897  int i,
898  j;
899  int numParents;
900 
901  numParents = 0;
902  for (i = 0; i < numInherits; i++)
903  {
904  if (inhinfo[i].inhrelid == oid)
905  numParents++;
906  }
907 
908  self->numParents = numParents;
909 
910  if (numParents > 0)
911  {
912  self->parents = (TableInfo **)
913  pg_malloc(sizeof(TableInfo *) * numParents);
914  j = 0;
915  for (i = 0; i < numInherits; i++)
916  {
917  if (inhinfo[i].inhrelid == oid)
918  {
919  TableInfo *parent;
920 
921  parent = findTableByOid(inhinfo[i].inhparent);
922  if (parent == NULL)
923  {
924  write_msg(NULL, "failed sanity check, parent OID %u of table \"%s\" (OID %u) not found\n",
925  inhinfo[i].inhparent,
926  self->dobj.name,
927  oid);
928  exit_nicely(1);
929  }
930  self->parents[j++] = parent;
931  }
932  }
933  }
934  else
935  self->parents = NULL;
936 }
char * name
Definition: pg_dump.h:133
TableInfo * findTableByOid(Oid oid)
Definition: common.c:740
struct _tableInfo ** parents
Definition: pg_dump.h:330
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
unsigned int Oid
Definition: postgres_ext.h:31
DumpableObject dobj
Definition: pg_dump.h:261
#define exit_nicely(code)
Definition: pg_dumpall.c:91
void write_msg(const char *modulename, const char *fmt,...)
#define NULL
Definition: c.h:229
int i
TableInfo* findTableByOid ( Oid  oid)

Definition at line 740 of file common.c.

References findObjectByOid(), and numTables.

Referenced by dumpSequence(), findParentsByOid(), getOwnedSeqs(), getRules(), getTableDataFKConstraints(), processExtensionTables(), and selectDumpableType().

741 {
743 }
static int numTables
Definition: common.c:57
static DumpableObject * findObjectByOid(Oid oid, DumpableObject **indexArray, int numObjs)
Definition: common.c:590
static DumpableObject ** tblinfoindex
Definition: common.c:50
TypeInfo* findTypeByOid ( Oid  oid)

Definition at line 751 of file common.c.

References findObjectByOid(), and numTypes.

Referenced by DOTypeNameCompare(), getCasts(), and getTransforms().

752 {
753  return (TypeInfo *) findObjectByOid(oid, typinfoindex, numTypes);
754 }
static int numTypes
Definition: common.c:58
static DumpableObject * findObjectByOid(Oid oid, DumpableObject **indexArray, int numObjs)
Definition: common.c:590
static DumpableObject ** typinfoindex
Definition: common.c:51
static void flagInhAttrs ( DumpOptions dopt,
TableInfo tblinfo,
int  numTables 
)
static

Definition at line 351 of file common.c.

References addObjectDependency(), _attrDefInfo::adef_expr, _attrDefInfo::adnum, _attrDefInfo::adtable, AssignDumpId(), _tableInfo::attisdropped, _tableInfo::attnames, _tableInfo::attrdefs, _dumpableObject::catId, DO_ATTRDEF, _tableInfo::dobj, _attrDefInfo::dobj, _dumpableObject::dump, _dumpableObject::dumpId, i, _tableInfo::inhNotNull, _dumpableObject::name, _tableInfo::notnull, NULL, _tableInfo::numatts, _tableInfo::numParents, numTables, _dumpableObject::objType, CatalogId::oid, _tableInfo::parents, pg_malloc(), pg_strdup(), _tableInfo::relkind, RELKIND_MATVIEW, RELKIND_SEQUENCE, RELKIND_VIEW, _attrDefInfo::separate, shouldPrintColumn(), strInArray(), and CatalogId::tableoid.

Referenced by getSchemaData().

352 {
353  int i,
354  j,
355  k;
356 
357  for (i = 0; i < numTables; i++)
358  {
359  TableInfo *tbinfo = &(tblinfo[i]);
360  int numParents;
361  TableInfo **parents;
362 
363  /* Some kinds never have parents */
364  if (tbinfo->relkind == RELKIND_SEQUENCE ||
365  tbinfo->relkind == RELKIND_VIEW ||
366  tbinfo->relkind == RELKIND_MATVIEW)
367  continue;
368 
369  /* Don't bother computing anything for non-target tables, either */
370  if (!tbinfo->dobj.dump)
371  continue;
372 
373  numParents = tbinfo->numParents;
374  parents = tbinfo->parents;
375 
376  if (numParents == 0)
377  continue; /* nothing to see here, move along */
378 
379  /* For each column, search for matching column names in parent(s) */
380  for (j = 0; j < tbinfo->numatts; j++)
381  {
382  bool foundNotNull; /* Attr was NOT NULL in a parent */
383  bool foundDefault; /* Found a default in a parent */
384 
385  /* no point in examining dropped columns */
386  if (tbinfo->attisdropped[j])
387  continue;
388 
389  foundNotNull = false;
390  foundDefault = false;
391  for (k = 0; k < numParents; k++)
392  {
393  TableInfo *parent = parents[k];
394  int inhAttrInd;
395 
396  inhAttrInd = strInArray(tbinfo->attnames[j],
397  parent->attnames,
398  parent->numatts);
399  if (inhAttrInd >= 0)
400  {
401  foundNotNull |= parent->notnull[inhAttrInd];
402  foundDefault |= (parent->attrdefs[inhAttrInd] != NULL);
403  }
404  }
405 
406  /* Remember if we found inherited NOT NULL */
407  tbinfo->inhNotNull[j] = foundNotNull;
408 
409  /* Manufacture a DEFAULT NULL clause if necessary */
410  if (foundDefault && tbinfo->attrdefs[j] == NULL)
411  {
412  AttrDefInfo *attrDef;
413 
414  attrDef = (AttrDefInfo *) pg_malloc(sizeof(AttrDefInfo));
415  attrDef->dobj.objType = DO_ATTRDEF;
416  attrDef->dobj.catId.tableoid = 0;
417  attrDef->dobj.catId.oid = 0;
418  AssignDumpId(&attrDef->dobj);
419  attrDef->dobj.name = pg_strdup(tbinfo->dobj.name);
420  attrDef->dobj.namespace = tbinfo->dobj.namespace;
421  attrDef->dobj.dump = tbinfo->dobj.dump;
422 
423  attrDef->adtable = tbinfo;
424  attrDef->adnum = j + 1;
425  attrDef->adef_expr = pg_strdup("NULL");
426 
427  /* Will column be dumped explicitly? */
428  if (shouldPrintColumn(dopt, tbinfo, j))
429  {
430  attrDef->separate = false;
431  /* No dependency needed: NULL cannot have dependencies */
432  }
433  else
434  {
435  /* column will be suppressed, print default separately */
436  attrDef->separate = true;
437  /* ensure it comes out after the table */
438  addObjectDependency(&attrDef->dobj,
439  tbinfo->dobj.dumpId);
440  }
441 
442  tbinfo->attrdefs[j] = attrDef;
443  }
444  }
445  }
446 }
char * name
Definition: pg_dump.h:133
struct _tableInfo ** parents
Definition: pg_dump.h:330
char relkind
Definition: pg_dump.h:267
DumpComponents dump
Definition: pg_dump.h:134
Oid tableoid
Definition: pg_backup.h:225
void AssignDumpId(DumpableObject *dobj)
Definition: common.c:457
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
bool shouldPrintColumn(DumpOptions *dopt, TableInfo *tbinfo, int colno)
Definition: pg_dump.c:8233
#define RELKIND_MATVIEW
Definition: pg_class.h:165
bool * inhNotNull
Definition: pg_dump.h:319
DumpId dumpId
Definition: pg_dump.h:132
static int numTables
Definition: common.c:57
char ** attnames
Definition: pg_dump.h:304
DumpableObject dobj
Definition: pg_dump.h:261
static int strInArray(const char *pattern, char **arr, int arr_size)
Definition: common.c:1001
bool separate
Definition: pg_dump.h:342
char * pg_strdup(const char *in)
Definition: fe_memutils.c:85
bool * attisdropped
Definition: pg_dump.h:310
TableInfo * adtable
Definition: pg_dump.h:339
int numatts
Definition: pg_dump.h:303
bool * notnull
Definition: pg_dump.h:318
DumpableObject dobj
Definition: pg_dump.h:338
#define NULL
Definition: c.h:229
struct _attrDefInfo ** attrdefs
Definition: pg_dump.h:320
void addObjectDependency(DumpableObject *dobj, DumpId refId)
Definition: common.c:693
CatalogId catId
Definition: pg_dump.h:131
#define RELKIND_VIEW
Definition: pg_class.h:164
int i
int numParents
Definition: pg_dump.h:329
#define RELKIND_SEQUENCE
Definition: pg_class.h:162
DumpableObjectType objType
Definition: pg_dump.h:130
char * adef_expr
Definition: pg_dump.h:341
static void flagInhTables ( TableInfo tbinfo,
int  numTables,
InhInfo inhinfo,
int  numInherits 
)
static

Definition at line 307 of file common.c.

References findParentsByOid(), i, _tableInfo::numParents, numTables, _tableInfo::parents, RELKIND_MATVIEW, RELKIND_SEQUENCE, and RELKIND_VIEW.

Referenced by getSchemaData().

309 {
310  int i,
311  j;
312  int numParents;
313  TableInfo **parents;
314 
315  for (i = 0; i < numTables; i++)
316  {
317  /* Some kinds never have parents */
318  if (tblinfo[i].relkind == RELKIND_SEQUENCE ||
319  tblinfo[i].relkind == RELKIND_VIEW ||
320  tblinfo[i].relkind == RELKIND_MATVIEW)
321  continue;
322 
323  /* Don't bother computing anything for non-target tables, either */
324  if (!tblinfo[i].dobj.dump)
325  continue;
326 
327  /* Find all the immediate parent tables */
328  findParentsByOid(&tblinfo[i], inhinfo, numInherits);
329 
330  /* Mark the parents as interesting for getTableAttrs */
331  numParents = tblinfo[i].numParents;
332  parents = tblinfo[i].parents;
333  for (j = 0; j < numParents; j++)
334  parents[j]->interesting = true;
335  }
336 }
struct _tableInfo ** parents
Definition: pg_dump.h:330
#define RELKIND_MATVIEW
Definition: pg_class.h:165
static void findParentsByOid(TableInfo *self, InhInfo *inhinfo, int numInherits)
Definition: common.c:893
static int numTables
Definition: common.c:57
#define RELKIND_VIEW
Definition: pg_class.h:164
int i
#define RELKIND_SEQUENCE
Definition: pg_class.h:162
void getDumpableObjects ( DumpableObject ***  objs,
int *  numObjs 
)

Definition at line 671 of file common.c.

References allocedDumpIds, i, and pg_malloc().

Referenced by findObjectByCatalogId(), getTableDataFKConstraints(), and main().

672 {
673  int i,
674  j;
675 
676  *objs = (DumpableObject **)
678  j = 0;
679  for (i = 1; i < allocedDumpIds; i++)
680  {
681  if (dumpIdMap[i])
682  (*objs)[j++] = dumpIdMap[i];
683  }
684  *numObjs = j;
685 }
static int allocedDumpIds
Definition: common.c:32
static DumpableObject ** dumpIdMap
Definition: common.c:31
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
int i
DumpId getMaxDumpId ( void  )

Definition at line 510 of file common.c.

References lastDumpId.

Referenced by findDependencyLoops(), and TopoSort().

511 {
512  return lastDumpId;
513 }
static DumpId lastDumpId
Definition: common.c:33
TableInfo* getSchemaData ( Archive fout,
int *  numTablesPtr 
)

Definition at line 86 of file common.c.

References buildIndexArray(), Archive::dopt, flagInhAttrs(), flagInhTables(), g_verbose, getAccessMethods(), getAggregates(), getCasts(), getCollations(), getConstraints(), getConversions(), getDefaultACLs(), getEventTriggers(), getExtendedStatistics(), getExtensionMembership(), getExtensions(), getForeignDataWrappers(), getForeignServers(), getFuncs(), getIndexes(), getInherits(), getNamespaces(), getOpclasses(), getOperators(), getOpfamilies(), getOwnedSeqs(), getPolicies(), getProcLangs(), getPublications(), getPublicationTables(), getRules(), getSubscriptions(), getTableAttrs(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), NULL, numCollations, numExtensions, numFuncs, numNamespaces, numOperators, numTables, numTypes, processExtensionTables(), and write_msg().

Referenced by main().

87 {
88  TableInfo *tblinfo;
90  FuncInfo *funinfo;
91  OprInfo *oprinfo;
92  CollInfo *collinfo;
93  NamespaceInfo *nspinfo;
94  ExtensionInfo *extinfo;
95  InhInfo *inhinfo;
96  int numAggregates;
97  int numInherits;
98  int numRules;
99  int numProcLangs;
100  int numCasts;
101  int numTransforms;
102  int numAccessMethods;
103  int numOpclasses;
104  int numOpfamilies;
105  int numConversions;
106  int numTSParsers;
107  int numTSTemplates;
108  int numTSDicts;
109  int numTSConfigs;
110  int numForeignDataWrappers;
111  int numForeignServers;
112  int numDefaultACLs;
113  int numEventTriggers;
114 
115  /*
116  * We must read extensions and extension membership info first, because
117  * extension membership needs to be consultable during decisions about
118  * whether other objects are to be dumped.
119  */
120  if (g_verbose)
121  write_msg(NULL, "reading extensions\n");
122  extinfo = getExtensions(fout, &numExtensions);
124 
125  if (g_verbose)
126  write_msg(NULL, "identifying extension members\n");
127  getExtensionMembership(fout, extinfo, numExtensions);
128 
129  if (g_verbose)
130  write_msg(NULL, "reading schemas\n");
131  nspinfo = getNamespaces(fout, &numNamespaces);
133 
134  /*
135  * getTables should be done as soon as possible, so as to minimize the
136  * window between starting our transaction and acquiring per-table locks.
137  * However, we have to do getNamespaces first because the tables get
138  * linked to their containing namespaces during getTables.
139  */
140  if (g_verbose)
141  write_msg(NULL, "reading user-defined tables\n");
142  tblinfo = getTables(fout, &numTables);
143  tblinfoindex = buildIndexArray(tblinfo, numTables, sizeof(TableInfo));
144 
145  /* Do this after we've built tblinfoindex */
146  getOwnedSeqs(fout, tblinfo, numTables);
147 
148  if (g_verbose)
149  write_msg(NULL, "reading user-defined functions\n");
150  funinfo = getFuncs(fout, &numFuncs);
151  funinfoindex = buildIndexArray(funinfo, numFuncs, sizeof(FuncInfo));
152 
153  /* this must be after getTables and getFuncs */
154  if (g_verbose)
155  write_msg(NULL, "reading user-defined types\n");
156  typinfo = getTypes(fout, &numTypes);
157  typinfoindex = buildIndexArray(typinfo, numTypes, sizeof(TypeInfo));
158 
159  /* this must be after getFuncs, too */
160  if (g_verbose)
161  write_msg(NULL, "reading procedural languages\n");
162  getProcLangs(fout, &numProcLangs);
163 
164  if (g_verbose)
165  write_msg(NULL, "reading user-defined aggregate functions\n");
166  getAggregates(fout, &numAggregates);
167 
168  if (g_verbose)
169  write_msg(NULL, "reading user-defined operators\n");
170  oprinfo = getOperators(fout, &numOperators);
171  oprinfoindex = buildIndexArray(oprinfo, numOperators, sizeof(OprInfo));
172 
173  if (g_verbose)
174  write_msg(NULL, "reading user-defined access methods\n");
175  getAccessMethods(fout, &numAccessMethods);
176 
177  if (g_verbose)
178  write_msg(NULL, "reading user-defined operator classes\n");
179  getOpclasses(fout, &numOpclasses);
180 
181  if (g_verbose)
182  write_msg(NULL, "reading user-defined operator families\n");
183  getOpfamilies(fout, &numOpfamilies);
184 
185  if (g_verbose)
186  write_msg(NULL, "reading user-defined text search parsers\n");
187  getTSParsers(fout, &numTSParsers);
188 
189  if (g_verbose)
190  write_msg(NULL, "reading user-defined text search templates\n");
191  getTSTemplates(fout, &numTSTemplates);
192 
193  if (g_verbose)
194  write_msg(NULL, "reading user-defined text search dictionaries\n");
195  getTSDictionaries(fout, &numTSDicts);
196 
197  if (g_verbose)
198  write_msg(NULL, "reading user-defined text search configurations\n");
199  getTSConfigurations(fout, &numTSConfigs);
200 
201  if (g_verbose)
202  write_msg(NULL, "reading user-defined foreign-data wrappers\n");
203  getForeignDataWrappers(fout, &numForeignDataWrappers);
204 
205  if (g_verbose)
206  write_msg(NULL, "reading user-defined foreign servers\n");
207  getForeignServers(fout, &numForeignServers);
208 
209  if (g_verbose)
210  write_msg(NULL, "reading default privileges\n");
211  getDefaultACLs(fout, &numDefaultACLs);
212 
213  if (g_verbose)
214  write_msg(NULL, "reading user-defined collations\n");
215  collinfo = getCollations(fout, &numCollations);
216  collinfoindex = buildIndexArray(collinfo, numCollations, sizeof(CollInfo));
217 
218  if (g_verbose)
219  write_msg(NULL, "reading user-defined conversions\n");
220  getConversions(fout, &numConversions);
221 
222  if (g_verbose)
223  write_msg(NULL, "reading type casts\n");
224  getCasts(fout, &numCasts);
225 
226  if (g_verbose)
227  write_msg(NULL, "reading transforms\n");
228  getTransforms(fout, &numTransforms);
229 
230  if (g_verbose)
231  write_msg(NULL, "reading table inheritance information\n");
232  inhinfo = getInherits(fout, &numInherits);
233 
234  if (g_verbose)
235  write_msg(NULL, "reading event triggers\n");
236  getEventTriggers(fout, &numEventTriggers);
237 
238  /* Identify extension configuration tables that should be dumped */
239  if (g_verbose)
240  write_msg(NULL, "finding extension tables\n");
241  processExtensionTables(fout, extinfo, numExtensions);
242 
243  /* Link tables to parents, mark parents of target tables interesting */
244  if (g_verbose)
245  write_msg(NULL, "finding inheritance relationships\n");
246  flagInhTables(tblinfo, numTables, inhinfo, numInherits);
247 
248  if (g_verbose)
249  write_msg(NULL, "reading column info for interesting tables\n");
250  getTableAttrs(fout, tblinfo, numTables);
251 
252  if (g_verbose)
253  write_msg(NULL, "flagging inherited columns in subtables\n");
254  flagInhAttrs(fout->dopt, tblinfo, numTables);
255 
256  if (g_verbose)
257  write_msg(NULL, "reading indexes\n");
258  getIndexes(fout, tblinfo, numTables);
259 
260  if (g_verbose)
261  write_msg(NULL, "reading extended statistics\n");
262  getExtendedStatistics(fout, tblinfo, numTables);
263 
264  if (g_verbose)
265  write_msg(NULL, "reading constraints\n");
266  getConstraints(fout, tblinfo, numTables);
267 
268  if (g_verbose)
269  write_msg(NULL, "reading triggers\n");
270  getTriggers(fout, tblinfo, numTables);
271 
272  if (g_verbose)
273  write_msg(NULL, "reading rewrite rules\n");
274  getRules(fout, &numRules);
275 
276  if (g_verbose)
277  write_msg(NULL, "reading policies\n");
278  getPolicies(fout, tblinfo, numTables);
279 
280  if (g_verbose)
281  write_msg(NULL, "reading publications\n");
282  getPublications(fout);
283 
284  if (g_verbose)
285  write_msg(NULL, "reading publication membership\n");
286  getPublicationTables(fout, tblinfo, numTables);
287 
288  if (g_verbose)
289  write_msg(NULL, "reading subscriptions\n");
290  getSubscriptions(fout);
291 
292  *numTablesPtr = numTables;
293  return tblinfo;
294 }
FuncInfo * getFuncs(Archive *fout, int *numFuncs)
Definition: pg_dump.c:5261
static DumpableObject ** collinfoindex
Definition: common.c:54
static int numTypes
Definition: common.c:58
AggInfo * getAggregates(Archive *fout, int *numAggs)
Definition: pg_dump.c:5069
void getPublicationTables(Archive *fout, TableInfo tblinfo[], int numTables)
Definition: pg_dump.c:3542
CollInfo * getCollations(Archive *fout, int *numCollations)
Definition: pg_dump.c:4668
OprInfo * getOperators(Archive *fout, int *numOprs)
Definition: pg_dump.c:4582
static DumpableObject ** oprinfoindex
Definition: common.c:53
TransformInfo * getTransforms(Archive *fout, int *numTransforms)
Definition: pg_dump.c:7661
DefaultACLInfo * getDefaultACLs(Archive *fout, int *numDefaultACLs)
Definition: pg_dump.c:8911
static int numFuncs
Definition: common.c:59
AccessMethodInfo * getAccessMethods(Archive *fout, int *numAccessMethods)
Definition: pg_dump.c:4827
OpclassInfo * getOpclasses(Archive *fout, int *numOpclasses)
Definition: pg_dump.c:4904
TSConfigInfo * getTSConfigurations(Archive *fout, int *numTSConfigs)
Definition: pg_dump.c:8509
static void flagInhTables(TableInfo *tbinfo, int numTables, InhInfo *inhinfo, int numInherits)
Definition: common.c:307
static int numTables
Definition: common.c:57
static DumpableObject ** buildIndexArray(void *objArray, int numObjs, Size objSize)
Definition: common.c:628
TSParserInfo * getTSParsers(Archive *fout, int *numTSParsers)
Definition: pg_dump.c:8249
static DumpableObject ** typinfoindex
Definition: common.c:51
void getConstraints(Archive *fout, TableInfo tblinfo[], int numTables)
Definition: pg_dump.c:6770
InhInfo * getInherits(Archive *fout, int *numInherits)
Definition: pg_dump.c:6333
static int numOperators
Definition: common.c:60
DumpOptions * dopt
Definition: pg_backup.h:180
TableInfo * getTables(Archive *fout, int *numTables)
Definition: pg_dump.c:5495
void getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
Definition: pg_dump.c:3116
EventTriggerInfo * getEventTriggers(Archive *fout, int *numEventTriggers)
Definition: pg_dump.c:7270
static DumpableObject ** tblinfoindex
Definition: common.c:50
NamespaceInfo * getNamespaces(Archive *fout, int *numNamespaces)
Definition: pg_dump.c:4070
static int numExtensions
Definition: common.c:63
static int numNamespaces
Definition: common.c:62
RuleInfo * getRules(Archive *fout, int *numRules)
Definition: pg_dump.c:6954
FdwInfo * getForeignDataWrappers(Archive *fout, int *numForeignDataWrappers)
Definition: pg_dump.c:8589
void processExtensionTables(Archive *fout, ExtensionInfo extinfo[], int numExtensions)
Definition: pg_dump.c:17215
void getSubscriptions(Archive *fout)
Definition: pg_dump.c:3691
void getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
Definition: pg_dump.c:6387
TSDictInfo * getTSDictionaries(Archive *fout, int *numTSDicts)
Definition: pg_dump.c:8343
void getTriggers(Archive *fout, TableInfo tblinfo[], int numTables)
Definition: pg_dump.c:7070
void getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
Definition: pg_dump.c:7761
void getExtendedStatistics(Archive *fout, TableInfo tblinfo[], int numTables)
Definition: pg_dump.c:6671
void getOwnedSeqs(Archive *fout, TableInfo tblinfo[], int numTables)
Definition: pg_dump.c:6282
void write_msg(const char *modulename, const char *fmt,...)
ConvInfo * getConversions(Archive *fout, int *numConversions)
Definition: pg_dump.c:4751
#define NULL
Definition: c.h:229
OpfamilyInfo * getOpfamilies(Archive *fout, int *numOpfamilies)
Definition: pg_dump.c:4982
TSTemplateInfo * getTSTemplates(Archive *fout, int *numTSTemplates)
Definition: pg_dump.c:8430
static int numCollations
Definition: common.c:61
ExtensionInfo * getExtensions(Archive *fout, int *numExtensions)
Definition: pg_dump.c:4242
TypeInfo * getTypes(Archive *fout, int *numTypes)
Definition: pg_dump.c:4329
static DumpableObject ** extinfoindex
Definition: common.c:56
void getPublications(Archive *fout)
Definition: pg_dump.c:3379
ForeignServerInfo * getForeignServers(Archive *fout, int *numForeignServers)
Definition: pg_dump.c:8758
static DumpableObject ** funinfoindex
Definition: common.c:52
static DumpableObject ** nspinfoindex
Definition: common.c:55
ProcLangInfo * getProcLangs(Archive *fout, int *numProcLangs)
Definition: pg_dump.c:7364
void getExtensionMembership(Archive *fout, ExtensionInfo extinfo[], int numExtensions)
Definition: pg_dump.c:17107
static void flagInhAttrs(DumpOptions *dopt, TableInfo *tblinfo, int numTables)
Definition: common.c:351
bool g_verbose
Definition: pg_dump.c:91
CastInfo * getCasts(Archive *fout, int *numCasts)
Definition: pg_dump.c:7545
void parseOidArray ( const char *  str,
Oid array,
int  arraysize 
)

Definition at line 948 of file common.c.

References atooid, exit_nicely, InvalidOid, NULL, and write_msg().

Referenced by dumpFunc(), getAggregates(), getFuncs(), and getIndexes().

949 {
950  int j,
951  argNum;
952  char temp[100];
953  char s;
954 
955  argNum = 0;
956  j = 0;
957  for (;;)
958  {
959  s = *str++;
960  if (s == ' ' || s == '\0')
961  {
962  if (j > 0)
963  {
964  if (argNum >= arraysize)
965  {
966  write_msg(NULL, "could not parse numeric array \"%s\": too many numbers\n", str);
967  exit_nicely(1);
968  }
969  temp[j] = '\0';
970  array[argNum++] = atooid(temp);
971  j = 0;
972  }
973  if (s == '\0')
974  break;
975  }
976  else
977  {
978  if (!(isdigit((unsigned char) s) || s == '-') ||
979  j >= sizeof(temp) - 1)
980  {
981  write_msg(NULL, "could not parse numeric array \"%s\": invalid character in number\n", str);
982  exit_nicely(1);
983  }
984  temp[j++] = s;
985  }
986  }
987 
988  while (argNum < arraysize)
989  array[argNum++] = InvalidOid;
990 }
#define atooid(x)
Definition: postgres_ext.h:42
#define exit_nicely(code)
Definition: pg_dumpall.c:91
#define InvalidOid
Definition: postgres_ext.h:36
void write_msg(const char *modulename, const char *fmt,...)
#define NULL
Definition: c.h:229
void removeObjectDependency ( DumpableObject dobj,
DumpId  refId 
)

Definition at line 720 of file common.c.

References _dumpableObject::dependencies, i, and _dumpableObject::nDeps.

Referenced by repairDependencyLoop(), repairDomainConstraintLoop(), repairDomainConstraintMultiLoop(), repairMatViewBoundaryMultiLoop(), repairTableAttrDefLoop(), repairTableAttrDefMultiLoop(), repairTableConstraintLoop(), repairTableConstraintMultiLoop(), repairTypeFuncLoop(), repairViewRuleLoop(), and repairViewRuleMultiLoop().

721 {
722  int i;
723  int j = 0;
724 
725  for (i = 0; i < dobj->nDeps; i++)
726  {
727  if (dobj->dependencies[i] != refId)
728  dobj->dependencies[j++] = dobj->dependencies[i];
729  }
730  dobj->nDeps = j;
731 }
DumpId * dependencies
Definition: pg_dump.h:138
int i
void setExtensionMembership ( ExtensionMemberId extmems,
int  nextmems 
)

Definition at line 817 of file common.c.

References ExtensionMemberIdCompare(), numextmembers, and qsort.

Referenced by getExtensionMembership().

818 {
819  /* Sort array in preparation for binary searches */
820  if (nextmems > 1)
821  qsort((void *) extmems, nextmems, sizeof(ExtensionMemberId),
823  /* And save */
824  extmembers = extmems;
825  numextmembers = nextmems;
826 }
static int ExtensionMemberIdCompare(const void *p1, const void *p2)
Definition: common.c:871
static ExtensionMemberId * extmembers
Definition: common.c:66
static int numextmembers
Definition: common.c:67
#define qsort(a, b, c, d)
Definition: port.h:443
static int strInArray ( const char *  pattern,
char **  arr,
int  arr_size 
)
static

Definition at line 1001 of file common.c.

References i.

Referenced by flagInhAttrs().

1002 {
1003  int i;
1004 
1005  for (i = 0; i < arr_size; i++)
1006  {
1007  if (strcmp(pattern, arr[i]) == 0)
1008  return i;
1009  }
1010  return -1;
1011 }
int i

Variable Documentation

int allocedDumpIds = 0
static

Definition at line 32 of file common.c.

Referenced by AssignDumpId(), findObjectByDumpId(), and getDumpableObjects().

DumpableObject** catalogIdMap = NULL
static

Definition at line 39 of file common.c.

Referenced by findObjectByCatalogId().

bool catalogIdMapValid = false
static

Definition at line 38 of file common.c.

Referenced by AssignDumpId(), and findObjectByCatalogId().

DumpableObject** collinfoindex
static

Definition at line 54 of file common.c.

DumpableObject** dumpIdMap = NULL
static

Definition at line 31 of file common.c.

DumpableObject** extinfoindex
static

Definition at line 56 of file common.c.

ExtensionMemberId* extmembers
static

Definition at line 66 of file common.c.

Referenced by findOwningExtension(), and getExtensionMembership().

DumpableObject** funinfoindex
static

Definition at line 52 of file common.c.

DumpId lastDumpId = 0
static

Definition at line 33 of file common.c.

Referenced by AssignDumpId(), createDumpId(), and getMaxDumpId().

DumpableObject** nspinfoindex
static

Definition at line 55 of file common.c.

int numCatalogIds = 0
static

Definition at line 40 of file common.c.

Referenced by findObjectByCatalogId().

int numCollations
static

Definition at line 61 of file common.c.

Referenced by findCollationByOid(), and getSchemaData().

int numExtensions
static

Definition at line 63 of file common.c.

Referenced by findExtensionByOid(), getSchemaData(), and processExtensionTables().

int numextmembers
static

Definition at line 67 of file common.c.

Referenced by findOwningExtension(), and setExtensionMembership().

int numFuncs
static

Definition at line 59 of file common.c.

Referenced by findFuncByOid(), and getSchemaData().

int numNamespaces
static

Definition at line 62 of file common.c.

Referenced by findNamespaceByOid(), and getSchemaData().

int numOperators
static

Definition at line 60 of file common.c.

Referenced by findOprByOid(), and getSchemaData().

int numTypes
static

Definition at line 58 of file common.c.

Referenced by findTypeByOid(), and getSchemaData().

DumpableObject** oprinfoindex
static

Definition at line 53 of file common.c.

DumpableObject** tblinfoindex
static

Definition at line 50 of file common.c.

DumpableObject** typinfoindex
static

Definition at line 51 of file common.c.