summaryrefslogtreecommitdiffstats
path: root/src/test/isolation/specs/fk-contention.spec
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
commit46651ce6fe013220ed397add242004d764fc0153 (patch)
tree6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/test/isolation/specs/fk-contention.spec
parentInitial commit. (diff)
downloadpostgresql-14-46651ce6fe013220ed397add242004d764fc0153.tar.xz
postgresql-14-46651ce6fe013220ed397add242004d764fc0153.zip
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/isolation/specs/fk-contention.spec')
-rw-r--r--src/test/isolation/specs/fk-contention.spec19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/isolation/specs/fk-contention.spec b/src/test/isolation/specs/fk-contention.spec
new file mode 100644
index 0000000..f11a1d8
--- /dev/null
+++ b/src/test/isolation/specs/fk-contention.spec
@@ -0,0 +1,19 @@
+setup
+{
+ CREATE TABLE foo (a int PRIMARY KEY, b text);
+ CREATE TABLE bar (a int NOT NULL REFERENCES foo);
+ INSERT INTO foo VALUES (42);
+}
+
+teardown
+{
+ DROP TABLE foo, bar;
+}
+
+session s1
+setup { BEGIN; }
+step ins { INSERT INTO bar VALUES (42); }
+step com { COMMIT; }
+
+session s2
+step upd { UPDATE foo SET b = 'Hello World'; }