Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3a9e98

Browse files
committed
Extend a test case a little
This will possibly help a subsequent patch by making sure the noticemessages are distinct so that it's clear that they come out in theright order.Author: Fabien COELHO <coelho@cri.ensmp.fr>Discussion:https://www.postgresql.org/message-id/alpine.DEB.2.21.1904240654120.3407%40lancre
1 parent329784e commitb3a9e98

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/test/regress/expected/copydml.out

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ drop rule qqq on copydml_test;
8484
create function qqq_trig() returns trigger as $$
8585
begin
8686
if tg_op in ('INSERT', 'UPDATE') then
87-
raise notice '% %', tg_op, new.id;
87+
raise notice '% % %', tg_when, tg_op, new.id;
8888
return new;
8989
else
90-
raise notice '% %', tg_op, old.id;
90+
raise notice '% % %', tg_when, tg_op, old.id;
9191
return old;
9292
end if;
9393
end
@@ -97,16 +97,16 @@ create trigger qqqbef before insert or update or delete on copydml_test
9797
create trigger qqqaf after insert or update or delete on copydml_test
9898
for each row execute procedure qqq_trig();
9999
copy (insert into copydml_test (t) values ('f') returning id) to stdout;
100-
NOTICE: INSERT 8
100+
NOTICE:BEFOREINSERT 8
101101
8
102-
NOTICE: INSERT 8
102+
NOTICE:AFTERINSERT 8
103103
copy (update copydml_test set t = 'g' where t = 'f' returning id) to stdout;
104-
NOTICE: UPDATE 8
104+
NOTICE:BEFOREUPDATE 8
105105
8
106-
NOTICE: UPDATE 8
106+
NOTICE:AFTERUPDATE 8
107107
copy (delete from copydml_test where t = 'g' returning id) to stdout;
108-
NOTICE: DELETE 8
108+
NOTICE:BEFOREDELETE 8
109109
8
110-
NOTICE: DELETE 8
110+
NOTICE:AFTERDELETE 8
111111
drop table copydml_test;
112112
drop function qqq_trig();

‎src/test/regress/sql/copydml.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ drop rule qqq on copydml_test;
7070
createfunctionqqq_trig() returns triggeras $$
7171
begin
7272
if tg_opin ('INSERT','UPDATE') then
73-
raise notice'% %', tg_op,new.id;
73+
raise notice'% % %', tg_when, tg_op,new.id;
7474
return new;
7575
else
76-
raise notice'% %', tg_op,old.id;
76+
raise notice'% % %', tg_when, tg_op,old.id;
7777
return old;
7878
end if;
7979
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp