aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2020-04-22 22:12:19 +1200
committerDavid Rowley <drowley@postgresql.org>2020-04-22 22:12:19 +1200
commit9f2c4edec2e2182a2fef8495efdaf90a65d64e6c (patch)
tree454931362497cf25eed7cff737f5ea417b331c83 /src/backend/commands/tablecmds.c
parentaaf069aa345231823464f65b33c479a0958fe147 (diff)
downloadpostgresql-9f2c4edec2e2182a2fef8495efdaf90a65d64e6c.tar.gz
postgresql-9f2c4edec2e2182a2fef8495efdaf90a65d64e6c.zip
Remove bogus Assert in foreign key cloning code
This Assert was trying to ensure that the number of columns in the foreign key being cloned was the same number of attributes in the parentRel.  Of course, it's perfectly valid to have columns in the table which are not part of the foreign key constraint. It appears that this Assert was misunderstanding that. Reported-by: Rajkumar Raghuwanshi Reviewed-by: amul sul Discussion: https://postgr.es/m/CAKcux6=z1dtiWw5BOpqDx-U6KTiq+zD0Y2m810zUtWL+giVXWA@mail.gmail.com
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 794ff30fac7..5745cd648a6 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -9043,7 +9043,7 @@ CloneFkReferenced(Relation parentRel, Relation partitionRel)
conpfeqop,
conppeqop,
conffeqop);
- Assert(numfks == attmap->maplen);
+
for (int i = 0; i < numfks; i++)
mapped_confkey[i] = attmap->attnums[confkey[i] - 1];