summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-12-01 12:53:21 -0500
committerRobert Haas <rhaas@postgresql.org>2017-12-01 12:53:21 -0500
commit87c37e3291cb75273ccdf4645b9472dd805c4493 (patch)
tree7b952cc4b152b695193efcd98d006fd2d8b65280 /doc/src
parent1cbc17aaca82b2e262912da96c49b2e1d2f492e7 (diff)
Re-allow INSERT .. ON CONFLICT DO NOTHING on partitioned tables.
Commit 8355a011a0124bdf7ccbada206a967d427039553 was reverted in f05230752d53c4aa74cffa9b699983bbb6bcb118, but this attempt is hopefully better-considered: we now pass the correct value to ExecOpenIndices, which should avoid the crash that we hit before. Amit Langote, reviewed by Simon Riggs and by me. Some final editing by me. Discussion: http://postgr.es/m/7ff1e8ec-dc39-96b1-7f47-ff5965dceeac@lab.ntt.co.jp
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ddl.sgml13
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 9f583266de9..b1167a40e6a 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -3288,10 +3288,15 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
<listitem>
<para>
Using the <literal>ON CONFLICT</literal> clause with partitioned tables
- will cause an error, because unique or exclusion constraints can only be
- created on individual partitions. There is no support for enforcing
- uniqueness (or an exclusion constraint) across an entire partitioning
- hierarchy.
+ will cause an error if the conflict target is specified (see
+ <xref linkend="sql-on-conflict" /> for more details on how the clause
+ works). Therefore, it is not possible to specify
+ <literal>DO UPDATE</literal> as the alternative action, because
+ specifying the conflict target is mandatory in that case. On the other
+ hand, specifying <literal>DO NOTHING</literal> as the alternative action
+ works fine provided the conflict target is not specified. In that case,
+ unique constraints (or exclusion constraints) of the individual leaf
+ partitions are considered.
</para>
</listitem>