Skip to content

Commit d72d32f

Browse files
committed
Don't try to assign smart names to constraints
This part of my previous commit seems to have broken pg_upgrade on crake, at least from 9.2. I'll see if there's a better fix, but in the meantime this should suffice to keep the buildfarm green.
1 parent 2e2d460 commit d72d32f

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/bin/pg_dump/pg_dump.c

+3-13
Original file line numberDiff line numberDiff line change
@@ -9097,20 +9097,10 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
90979097
else if (use_throwaway_notnull)
90989098
{
90999099
/*
9100-
* Decide on a name for this constraint. If it is not an
9101-
* inherited constraint, give it a throwaway name to avoid any
9102-
* possible conflicts, since we're going to drop it soon
9103-
* anyway. If it is inherited then try harder, because it may
9104-
* (but not necessarily) persist after the restore.
9100+
* Give this constraint a throwaway name.
91059101
*/
9106-
if (tbinfo->notnull_inh[j])
9107-
/* XXX maybe try harder if the name is overlength */
9108-
tbinfo->notnull_constrs[j] =
9109-
psprintf("%s_%s_not_null",
9110-
tbinfo->dobj.name, tbinfo->attnames[j]);
9111-
else
9112-
tbinfo->notnull_constrs[j] =
9113-
psprintf("pgdump_throwaway_notnull_%d", notnullcount++);
9102+
tbinfo->notnull_constrs[j] =
9103+
psprintf("pgdump_throwaway_notnull_%d", notnullcount++);
91149104
tbinfo->notnull_throwaway[j] = true;
91159105
tbinfo->notnull_inh[j] = false;
91169106
}

0 commit comments

Comments
 (0)