Skip to content

Commit 9f2c4ed

Browse files
committed
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
1 parent aaf069a commit 9f2c4ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/tablecmds.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9043,7 +9043,7 @@ CloneFkReferenced(Relation parentRel, Relation partitionRel)
90439043
conpfeqop,
90449044
conppeqop,
90459045
conffeqop);
9046-
Assert(numfks == attmap->maplen);
9046+
90479047
for (int i = 0; i < numfks; i++)
90489048
mapped_confkey[i] = attmap->attnums[confkey[i] - 1];
90499049

0 commit comments

Comments
 (0)