File tree 4 files changed +55
-1
lines changed
4 files changed +55
-1
lines changed Original file line number Diff line number Diff line change
1
+ --
2
+ -- ASYNC
3
+ --
4
+ --Should work. Send a valid message via a valid channel name
5
+ SELECT pg_notify('notify_async1','sample message1');
6
+ pg_notify
7
+ -----------
8
+
9
+ (1 row)
10
+
11
+ SELECT pg_notify('notify_async1','');
12
+ pg_notify
13
+ -----------
14
+
15
+ (1 row)
16
+
17
+ SELECT pg_notify('notify_async1',NULL);
18
+ pg_notify
19
+ -----------
20
+
21
+ (1 row)
22
+
23
+ -- Should fail. Send a valid message via an invalid channel name
24
+ SELECT pg_notify('','sample message1');
25
+ ERROR: channel name cannot be empty
26
+ SELECT pg_notify(NULL,'sample message1');
27
+ ERROR: channel name cannot be empty
28
+ SELECT pg_notify('notify_async_channel_name_too_long______________________________','sample_message1');
29
+ ERROR: channel name too long
30
+ --Should work. Valid NOTIFY/LISTEN/UNLISTEN commands
31
+ NOTIFY notify_async2;
32
+ LISTEN notify_async2;
33
+ UNLISTEN notify_async2;
34
+ UNLISTEN *;
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ test: privileges security_label collate matview
88
88
# ----------
89
89
# Another group of parallel tests
90
90
# ----------
91
- test: alter_generic misc psql
91
+ test: alter_generic misc psql async
92
92
93
93
# rules cannot run concurrently with any test that creates a view
94
94
test: rules
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ test: matview
99
99
test: alter_generic
100
100
test: misc
101
101
test: psql
102
+ test: async
102
103
test: rules
103
104
test: event_trigger
104
105
test: select_views
Original file line number Diff line number Diff line change
1
+ --
2
+ -- ASYNC
3
+ --
4
+
5
+ -- Should work. Send a valid message via a valid channel name
6
+ SELECT pg_notify(' notify_async1' ,' sample message1' );
7
+ SELECT pg_notify(' notify_async1' ,' ' );
8
+ SELECT pg_notify(' notify_async1' ,NULL );
9
+
10
+ -- Should fail. Send a valid message via an invalid channel name
11
+ SELECT pg_notify(' ' ,' sample message1' );
12
+ SELECT pg_notify(NULL ,' sample message1' );
13
+ SELECT pg_notify(' notify_async_channel_name_too_long______________________________' ,' sample_message1' );
14
+
15
+ -- Should work. Valid NOTIFY/LISTEN/UNLISTEN commands
16
+ NOTIFY notify_async2;
17
+ LISTEN notify_async2;
18
+ UNLISTEN notify_async2;
19
+ UNLISTEN * ;
You can’t perform that action at this time.
0 commit comments