git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 5caa057) | patch
Fix ON CONFLICT DO NOTHING/UPDATE for temporal indexes
2024年5月10日 12:36:49 +0000 (14:36 +0200)
2024年5月10日 12:55:31 +0000 (14:55 +0200)
commit 144c2ce0cc75ff99c66749b0ca5235d037df7c09
Fix ON CONFLICT DO NOTHING/UPDATE for temporal indexes

A PRIMARY KEY or UNIQUE constraint with WITHOUT OVERLAPS will be a
GiST index, not a B-Tree, but it will still have indisunique set. The
code for ON CONFLICT fails if it sees a non-btree index that has
indisunique. This commit fixes that and adds some tests. But now
that we can't just test indisunique, we also need some extra checks to
prevent DO UPDATE from running against a WITHOUT OVERLAPS constraint
(because the conflict could happen against more than one row, and we'd
only update one).

Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Discussion: https://www.postgresql.org/message-id/1426589a-83cb-4a89-bf40-713970c07e63@illuminatedcomputing.com
src/backend/executor/execIndexing.c diff | blob | blame | history
src/backend/optimizer/util/plancat.c diff | blob | blame | history
src/test/regress/expected/without_overlaps.out diff | blob | blame | history
src/test/regress/sql/without_overlaps.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /