File tree 4 files changed +50
-0
lines changed
4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Generated subdirectories
2
+ /log /
3
+ /results /
4
+ /output_iso /
5
+ /tmp_check /
6
+ /tmp_check_iso /
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ EXTENSION = tcn
6
6
DATA = tcn--1.0.sql
7
7
PGFILEDESC = "tcn - trigger function notifying listeners"
8
8
9
+ ISOLATION = tcn
10
+
9
11
ifdef USE_PGXS
10
12
PG_CONFIG = pg_config
11
13
PGXS := $(shell $(PG_CONFIG ) --pgxs)
Original file line number Diff line number Diff line change
1
+ Parsed test spec with 1 sessions
2
+
3
+ starting permutation: listen insert insert2 update delete
4
+ step listen: LISTEN mychannel;
5
+ step insert: INSERT INTO mytable VALUES(1, 'one');
6
+ s1: NOTIFY "mychannel" with payload ""mytable",I,"key"='1'" from s1
7
+ step insert2: INSERT INTO mytable VALUES(2, 'two');
8
+ s1: NOTIFY "mychannel" with payload ""mytable",I,"key"='2'" from s1
9
+ step update: UPDATE mytable SET value = 'foo' WHERE key = 2;
10
+ s1: NOTIFY "mychannel" with payload ""mytable",U,"key"='2'" from s1
11
+ step delete: DELETE FROM mytable;
12
+ s1: NOTIFY "mychannel" with payload ""mytable",D,"key"='1'" from s1
13
+ s1: NOTIFY "mychannel" with payload ""mytable",D,"key"='2'" from s1
Original file line number Diff line number Diff line change
1
+ # Tests for contrib/tcn
2
+
3
+ # These tests use only self-notifies within a single session,
4
+ # which are convenient because they minimize timing concerns.
5
+ # Whether the NOTIFY mechanism works across sessions is not
6
+ # really tcn's problem.
7
+
8
+ setup
9
+ {
10
+ CREATE EXTENSION tcn ;
11
+ CREATE TABLE mytable (key int PRIMARY KEY , value text );
12
+ CREATE TRIGGER tcntrig AFTER INSERT OR UPDATE OR DELETE ON mytable
13
+ FOR EACH ROW EXECUTE FUNCTION triggered_change_notification (mychannel );
14
+ }
15
+
16
+ teardown
17
+ {
18
+ DROP TABLE mytable ;
19
+ }
20
+
21
+ session s1
22
+ step listen { LISTEN mychannel ; }
23
+ step insert { INSERT INTO mytable VALUES (1 , 'one' ); }
24
+ step insert2 { INSERT INTO mytable VALUES (2 , 'two' ); }
25
+ step update { UPDATE mytable SET value = 'foo' WHERE key = 2 ; }
26
+ step delete { DELETE FROM mytable ; }
27
+
28
+
29
+ permutation listen insert insert2 update delete
You can’t perform that action at this time.
0 commit comments