summaryrefslogtreecommitdiffstats
path: root/src/test/regress/expected/async.out
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
commit311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 (patch)
tree0ec307299b1dada3701e42f4ca6eda57d708261e /src/test/regress/expected/async.out
parentInitial commit. (diff)
downloadpostgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.tar.xz
postgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.zip
Adding upstream version 15.4.upstream/15.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/test/regress/expected/async.out42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/test/regress/expected/async.out b/src/test/regress/expected/async.out
new file mode 100644
index 0000000..19cbe38
--- /dev/null
+++ b/src/test/regress/expected/async.out
@@ -0,0 +1,42 @@
+--
+-- ASYNC
+--
+--Should work. Send a valid message via a valid channel name
+SELECT pg_notify('notify_async1','sample message1');
+ pg_notify
+-----------
+
+(1 row)
+
+SELECT pg_notify('notify_async1','');
+ pg_notify
+-----------
+
+(1 row)
+
+SELECT pg_notify('notify_async1',NULL);
+ pg_notify
+-----------
+
+(1 row)
+
+-- Should fail. Send a valid message via an invalid channel name
+SELECT pg_notify('','sample message1');
+ERROR: channel name cannot be empty
+SELECT pg_notify(NULL,'sample message1');
+ERROR: channel name cannot be empty
+SELECT pg_notify('notify_async_channel_name_too_long______________________________','sample_message1');
+ERROR: channel name too long
+--Should work. Valid NOTIFY/LISTEN/UNLISTEN commands
+NOTIFY notify_async2;
+LISTEN notify_async2;
+UNLISTEN notify_async2;
+UNLISTEN *;
+-- Should return zero while there are no pending notifications.
+-- src/test/isolation/specs/async-notify.spec tests for actual usage.
+SELECT pg_notification_queue_usage();
+ pg_notification_queue_usage
+-----------------------------
+ 0
+(1 row)
+