postgresql/src/test/isolation/specs
Andres Freund 168d5805e4 Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
The newly added ON CONFLICT clause allows to specify an alternative to
raising a unique or exclusion constraint violation error when inserting.
ON CONFLICT refers to constraints that can either be specified using a
inference clause (by specifying the columns of a unique constraint) or
by naming a unique or exclusion constraint.  DO NOTHING avoids the
constraint violation, without touching the pre-existing row.  DO UPDATE
SET ... [WHERE ...] updates the pre-existing tuple, and has access to
both the tuple proposed for insertion and the existing tuple; the
optional WHERE clause can be used to prevent an update from being
executed.  The UPDATE SET and WHERE clauses have access to the tuple
proposed for insertion using the "magic" EXCLUDED alias, and to the
pre-existing tuple using the table name or its alias.

This feature is often referred to as upsert.

This is implemented using a new infrastructure called "speculative
insertion". It is an optimistic variant of regular insertion that first
does a pre-check for existing tuples and then attempts an insert.  If a
violating tuple was inserted concurrently, the speculatively inserted
tuple is deleted and a new attempt is made.  If the pre-check finds a
matching tuple the alternative DO NOTHING or DO UPDATE action is taken.
If the insertion succeeds without detecting a conflict, the tuple is
deemed inserted.

To handle the possible ambiguity between the excluded alias and a table
named excluded, and for convenience with long relation names, INSERT
INTO now can alias its target table.

Bumps catversion as stored rules change.

Author: Peter Geoghegan, with significant contributions from Heikki
    Linnakangas and Andres Freund. Testing infrastructure by Jeff Janes.
Reviewed-By: Heikki Linnakangas, Andres Freund, Robert Haas, Simon Riggs,
    Dean Rasheed, Stephen Frost and many others.
2015-05-08 05:43:10 +02:00
..
aborted-keyrevoke.spec Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
alter-table-1.spec Isolation test files for ALTER TABLE patch 2014-04-06 11:44:24 -04:00
alter-table-2.spec Add new test files for lock level patch 2015-04-05 12:03:58 -04:00
alter-table-3.spec Add new test files for lock level patch 2015-04-05 12:03:58 -04:00
classroom-scheduling.spec
create-trigger.spec Add new test files for lock level patch 2015-04-05 12:03:58 -04:00
delete-abort-savept-2.spec Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
delete-abort-savept.spec Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
drop-index-concurrently-1.spec Allow drop-index-concurrently-1 test to run at any isolation level. 2013-10-08 16:55:12 -05:00
eval-plan-qual.spec Fix use-of-already-freed-memory problem in EvalPlanQual processing. 2015-01-15 18:52:58 -05:00
fk-contention.spec Add support for blocked commands in isolationtester 2011-07-12 17:24:17 -04:00
fk-deadlock.spec Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
fk-deadlock2.spec Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
index-only-scan.spec Fix serializable mode with index-only scans. 2012-09-04 21:13:11 -05:00
insert-conflict-do-nothing.spec Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
insert-conflict-do-update-2.spec Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
insert-conflict-do-update-3.spec Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
insert-conflict-do-update.spec Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
lock-update-delete.spec Make some isolationtester specs more complete 2013-10-04 15:52:58 -03:00
lock-update-traversal.spec Make some isolationtester specs more complete 2013-10-04 15:52:58 -03:00
multiple-row-versions.spec The row-version chaining in Serializable Snapshot Isolation was still wrong. 2011-05-30 20:47:17 +03:00
multixact-no-deadlock.spec Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
multixact-no-forget.spec Fix improper abort during update chain locking 2013-12-05 17:47:51 -03:00
nowait-2.spec Update copyright for 2015 2015-01-06 11:43:47 -05:00
nowait-3.spec Update copyright for 2015 2015-01-06 11:43:47 -05:00
nowait-4.spec Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
nowait-5.spec Fix FOR UPDATE NOWAIT on updated tuple chains 2014-08-27 19:15:18 -04:00
nowait.spec Add regression tests for SELECT FOR UPDATE/SHARE NOWAIT. 2014-08-25 20:14:43 +03:00
partial-index.spec
prepared-transactions.spec Add an SSI regression test that tests all interesting permutations in the 2011-08-18 17:09:58 +03:00
project-manager.spec
propagate-lock-delete.spec Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
receipt-report.spec
referential-integrity.spec
ri-trigger.spec
simple-write-skew.spec
skip-locked-2.spec Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
skip-locked-3.spec Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
skip-locked-4.spec Update copyright for 2015 2015-01-06 11:43:47 -05:00
skip-locked.spec Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
temporal-range-integrity.spec
timeouts.spec Bump up timeout delays some more in timeouts isolation test. 2013-03-20 13:53:43 -04:00
total-cash.spec
tuplelock-conflict.spec Fix thinko in lock mode enum 2015-01-04 15:48:29 -03:00
two-ids.spec