Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
00a7767f
Commit
00a7767f
authored
Jul 03, 2013
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regression tests for LISTEN/NOTIFY/UNLISTEN/pg_notify.
Robins Tharakan, reviewed by Szymon Guz
parent
ada3e776
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
1 deletion
+55
-1
src/test/regress/expected/async.out
src/test/regress/expected/async.out
+34
-0
src/test/regress/parallel_schedule
src/test/regress/parallel_schedule
+1
-1
src/test/regress/serial_schedule
src/test/regress/serial_schedule
+1
-0
src/test/regress/sql/async.sql
src/test/regress/sql/async.sql
+19
-0
No files found.
src/test/regress/expected/async.out
0 → 100644
View file @
00a7767f
--
-- 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 *;
src/test/regress/parallel_schedule
View file @
00a7767f
...
...
@@ -88,7 +88,7 @@ test: privileges security_label collate matview
# ----------
# Another group of parallel tests
# ----------
test: alter_generic misc psql
test: alter_generic misc psql
async
# rules cannot run concurrently with any test that creates a view
test: rules
...
...
src/test/regress/serial_schedule
View file @
00a7767f
...
...
@@ -99,6 +99,7 @@ test: matview
test: alter_generic
test: misc
test: psql
test: async
test: rules
test: event_trigger
test: select_views
...
...
src/test/regress/sql/async.sql
0 → 100644
View file @
00a7767f
--
-- ASYNC
--
--Should work. Send a valid message via a valid channel name
SELECT
pg_notify
(
'notify_async1'
,
'sample message1'
);
SELECT
pg_notify
(
'notify_async1'
,
''
);
SELECT
pg_notify
(
'notify_async1'
,
NULL
);
-- Should fail. Send a valid message via an invalid channel name
SELECT
pg_notify
(
''
,
'sample message1'
);
SELECT
pg_notify
(
NULL
,
'sample message1'
);
SELECT
pg_notify
(
'notify_async_channel_name_too_long______________________________'
,
'sample_message1'
);
--Should work. Valid NOTIFY/LISTEN/UNLISTEN commands
NOTIFY
notify_async2
;
LISTEN
notify_async2
;
UNLISTEN
notify_async2
;
UNLISTEN
*
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment