summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
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 dcf14b9dc0e..96375814a8f 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -17350,7 +17350,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd,
* If the parent itself is a partition, make sure to include its
* constraint as well.
*/
- partBoundConstraint = get_qual_from_partbound(attachrel, rel, cmd->bound);
+ partBoundConstraint = get_qual_from_partbound(rel, cmd->bound);
partConstraint = list_concat(partBoundConstraint,
RelationGetPartitionQual(rel));