Skip to content

Commit 0dd6a5b

Browse files
pierreforstmannsvenklemm
authored andcommitted
Fix chunk_constraint_drop_constraint (#7181)
1 parent 865640f commit 0dd6a5b

File tree

4 files changed

+84
-91
lines changed

4 files changed

+84
-91
lines changed

.unreleased/pr_8496

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Implements: #8496 Fix dropping chunks with foreign keys
2+
Thanks: @pierreforstmann for fixing a bug when dropping chunks with foreign keys

src/chunk_constraint.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,8 @@ chunk_constraint_drop_constraint(TupleInfo *ti)
954954
};
955955

956956
if (OidIsValid(constrobj.objectId))
957-
performDeletion(&constrobj, DROP_RESTRICT, 0);
957+
/* must use DROP_CASCADE if regular table references a hypertable */
958+
performDeletion(&constrobj, DROP_CASCADE, 0);
958959
}
959960
}
960961

0 commit comments

Comments
 (0)