aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2024-04-18 16:10:53 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2024-04-18 16:10:53 +0200
commitd72d32f52d26c9588256de90b9bc54fe312cee60 (patch)
tree26d37696e93c40d2b6b9013fb4a5344d748430e4 /src
parent2e2d4604d94318a304d350aee478bda91a521339 (diff)
downloadpostgresql-d72d32f52d26c9588256de90b9bc54fe312cee60.tar.gz
postgresql-d72d32f52d26c9588256de90b9bc54fe312cee60.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 13a6bce5119..6d2f3fdef38 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -9097,20 +9097,10 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
else if (use_throwaway_notnull)
{
/*
- * Decide on a name for this constraint. If it is not an
- * inherited constraint, give it a throwaway name to avoid any
- * possible conflicts, since we're going to drop it soon
- * anyway. If it is inherited then try harder, because it may
- * (but not necessarily) persist after the restore.
+ * Give this constraint a throwaway name.
*/
- if (tbinfo->notnull_inh[j])
- /* XXX maybe try harder if the name is overlength */
- tbinfo->notnull_constrs[j] =
- psprintf("%s_%s_not_null",
- tbinfo->dobj.name, tbinfo->attnames[j]);
- else
- tbinfo->notnull_constrs[j] =
- psprintf("pgdump_throwaway_notnull_%d", notnullcount++);
+ tbinfo->notnull_constrs[j] =
+ psprintf("pgdump_throwaway_notnull_%d", notnullcount++);
tbinfo->notnull_throwaway[j] = true;
tbinfo->notnull_inh[j] = false;
}