summaryrefslogtreecommitdiff
path: root/src/backend/parser/analyze.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2018-03-26 10:43:54 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2018-03-26 10:43:54 -0300
commit555ee77a9668e3f1b03307055b5027e13bf1a715 (patch)
treee024aef2f35c73208a7e5f11822d89d97548c6c1 /src/backend/parser/analyze.c
parent1b89c2188bd38eac68251f16051859996128f2d0 (diff)
Handle INSERT .. ON CONFLICT with partitioned tables
Commit eb7ed3f30634 enabled unique constraints on partitioned tables, but one thing that was not working properly is INSERT/ON CONFLICT. This commit introduces a new node keeps state related to the ON CONFLICT clause per partition, and fills it when that partition is about to be used for tuple routing. Author: Amit Langote, Álvaro Herrera Reviewed-by: Etsuro Fujita, Pavan Deolasee Discussion: https://postgr.es/m/20180228004602.cwdyralmg5ejdqkq@alvherre.pgsql
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r--src/backend/parser/analyze.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index cf1a34e41ae..a4b5aaef44f 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -1026,13 +1026,6 @@ transformOnConflictClause(ParseState *pstate,
TargetEntry *te;
int attno;
- if (targetrel->rd_partdesc)
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("%s cannot be applied to partitioned table \"%s\"",
- "ON CONFLICT DO UPDATE",
- RelationGetRelationName(targetrel))));
-
/*
* All INSERT expressions have been parsed, get ready for potentially
* existing SET statements that need to be processed like an UPDATE.