aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 c77b216d4f7..5856e729180 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -13167,7 +13167,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd)
tupleDesc = RelationGetDescr(attachRel);
attachRel_constr = tupleDesc->constr;
existConstraint = NIL;
- if (attachRel_constr > 0)
+ if (attachRel_constr != NULL)
{
int num_check = attachRel_constr->num_check;
int i;