4 --Should work. Send a valid message via a valid channel name
5 SELECT pg_notify('notify_async1','sample message1');
11 SELECT pg_notify('notify_async1','');
17 SELECT pg_notify('notify_async1',NULL);
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
33 UNLISTEN notify_async2;
35 -- Should return zero while there are no pending notifications.
36 -- src/test/isolation/specs/async-notify.spec tests for actual usage.
37 SELECT pg_notification_queue_usage();
38 pg_notification_queue_usage
39 -----------------------------