summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorRobert Haas2018-01-05 20:18:03 +0000
committerRobert Haas2018-01-05 20:22:33 +0000
commit19c47e7c820241e1befd975cb4411af7d43e1309 (patch)
treeaf3f82cd3f4a470f6a223d3c5bd3d336e4c35322 /src/backend/commands
parent84a6f63e32dbefe3dc76cbe628fab6cbfc26141e (diff)
Factor error generation out of ExecPartitionCheck.
At present, we always raise an ERROR if the partition constraint is violated, but a pending patch for UPDATE tuple routing will consider instead moving the tuple to the correct partition. Refactor to make that simpler. Amit Khandekar, reviewed by Amit Langote, David Rowley, and me. Discussion: http://postgr.es/m/CAJ3gD9cue54GbEzfV-61nyGpijvjZgCcghvLsB0_nL8Nm8HzCA@mail.gmail.com
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 66cbff7eadc..6bfca2a4af2 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -2731,7 +2731,7 @@ CopyFrom(CopyState cstate)
/* Check the constraints of the tuple */
if (cstate->rel->rd_att->constr || check_partition_constr)
- ExecConstraints(resultRelInfo, slot, estate);
+ ExecConstraints(resultRelInfo, slot, estate, true);
if (useHeapMultiInsert)
{