aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/common.c')
-rw-r--r--src/bin/pg_dump/common.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c
index 2d41a52e191..8950dee0ca8 100644
--- a/src/bin/pg_dump/common.c
+++ b/src/bin/pg_dump/common.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.103 2008/03/27 03:57:33 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.104 2008/05/09 23:32:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -62,8 +62,7 @@ static DumpableObject **oprinfoindex;
static void flagInhTables(TableInfo *tbinfo, int numTables,
InhInfo *inhinfo, int numInherits);
-static void flagInhAttrs(TableInfo *tbinfo, int numTables,
- InhInfo *inhinfo, int numInherits);
+static void flagInhAttrs(TableInfo *tblinfo, int numTables);
static DumpableObject **buildIndexArray(void *objArray, int numObjs,
Size objSize);
static int DOCatalogIdCompare(const void *p1, const void *p2);
@@ -191,7 +190,7 @@ getSchemaData(int *numTablesPtr)
if (g_verbose)
write_msg(NULL, "flagging inherited columns in subtables\n");
- flagInhAttrs(tblinfo, numTables, inhinfo, numInherits);
+ flagInhAttrs(tblinfo, numTables);
if (g_verbose)
write_msg(NULL, "reading indexes\n");
@@ -257,8 +256,7 @@ flagInhTables(TableInfo *tblinfo, int numTables,
* modifies tblinfo
*/
static void
-flagInhAttrs(TableInfo *tblinfo, int numTables,
- InhInfo *inhinfo, int numInherits)
+flagInhAttrs(TableInfo *tblinfo, int numTables)
{
int i,
j,
@@ -414,43 +412,6 @@ flagInhAttrs(TableInfo *tblinfo, int numTables,
tbinfo->inhAttrs[j] = false;
}
}
-
- /*
- * Check for inherited CHECK constraints. We assume a constraint is
- * inherited if its name matches the name of any constraint in the
- * parent. Originally this code tried to compare the expression
- * texts, but that can fail if the parent and child tables are in
- * different schemas, because reverse-listing of function calls may
- * produce different text (schema-qualified or not) depending on
- * search path. We really need a more bulletproof way of detecting
- * inherited constraints --- pg_constraint should record this
- * explicitly!
- */
- for (j = 0; j < tbinfo->ncheck; j++)
- {
- ConstraintInfo *constr;
-
- constr = &(tbinfo->checkexprs[j]);
-
- for (k = 0; k < numParents; k++)
- {
- int l;
-
- parent = parents[k];
- for (l = 0; l < parent->ncheck; l++)
- {
- ConstraintInfo *pconstr = &(parent->checkexprs[l]);
-
- if (strcmp(pconstr->dobj.name, constr->dobj.name) == 0)
- {
- constr->coninherited = true;
- break;
- }
- }
- if (constr->coninherited)
- break;
- }
- }
}
}