aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-02-26 09:11:15 +0100
committerPeter Eisentraut <peter@eisentraut.org>2021-02-26 09:11:15 +0100
commitb3a9e9897ec702d56602b26a8cdc0950f23b29dc (patch)
treef8ccc5665b6bab78d987ac243fa846005cda3d7b /src
parent329784e11849ff691f0157f3b27c50f652bce76a (diff)
downloadpostgresql-b3a9e9897ec702d56602b26a8cdc0950f23b29dc.tar.gz
postgresql-b3a9e9897ec702d56602b26a8cdc0950f23b29dc.zip
Extend a test case a little
This will possibly help a subsequent patch by making sure the notice messages are distinct so that it's clear that they come out in the right order. Author: Fabien COELHO <coelho@cri.ensmp.fr> Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1904240654120.3407%40lancre
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/copydml.out16
-rw-r--r--src/test/regress/sql/copydml.sql4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/regress/expected/copydml.out b/src/test/regress/expected/copydml.out
index 1b533962c6b..b5a225628f4 100644
--- a/src/test/regress/expected/copydml.out
+++ b/src/test/regress/expected/copydml.out
@@ -84,10 +84,10 @@ drop rule qqq on copydml_test;
create function qqq_trig() returns trigger as $$
begin
if tg_op in ('INSERT', 'UPDATE') then
- raise notice '% %', tg_op, new.id;
+ raise notice '% % %', tg_when, tg_op, new.id;
return new;
else
- raise notice '% %', tg_op, old.id;
+ raise notice '% % %', tg_when, tg_op, old.id;
return old;
end if;
end
@@ -97,16 +97,16 @@ create trigger qqqbef before insert or update or delete on copydml_test
create trigger qqqaf after insert or update or delete on copydml_test
for each row execute procedure qqq_trig();
copy (insert into copydml_test (t) values ('f') returning id) to stdout;
-NOTICE: INSERT 8
+NOTICE: BEFORE INSERT 8
8
-NOTICE: INSERT 8
+NOTICE: AFTER INSERT 8
copy (update copydml_test set t = 'g' where t = 'f' returning id) to stdout;
-NOTICE: UPDATE 8
+NOTICE: BEFORE UPDATE 8
8
-NOTICE: UPDATE 8
+NOTICE: AFTER UPDATE 8
copy (delete from copydml_test where t = 'g' returning id) to stdout;
-NOTICE: DELETE 8
+NOTICE: BEFORE DELETE 8
8
-NOTICE: DELETE 8
+NOTICE: AFTER DELETE 8
drop table copydml_test;
drop function qqq_trig();
diff --git a/src/test/regress/sql/copydml.sql b/src/test/regress/sql/copydml.sql
index 9a29f9c9acc..4578342253b 100644
--- a/src/test/regress/sql/copydml.sql
+++ b/src/test/regress/sql/copydml.sql
@@ -70,10 +70,10 @@ drop rule qqq on copydml_test;
create function qqq_trig() returns trigger as $$
begin
if tg_op in ('INSERT', 'UPDATE') then
- raise notice '% %', tg_op, new.id;
+ raise notice '% % %', tg_when, tg_op, new.id;
return new;
else
- raise notice '% %', tg_op, old.id;
+ raise notice '% % %', tg_when, tg_op, old.id;
return old;
end if;
end