RE: extension patch of CREATE OR REPLACE TRIGGER
От
osumi.takamichi@fujitsu.com
Тема
RE: extension patch of CREATE OR REPLACE TRIGGER
Дата
Msg-id
OSBPR01MB48883C847E6E2C048FB22EF7EDEA0@OSBPR01MB4888.jpnprd01.prod.outlook.com
Ответ на
Re: extension patch of CREATE OR REPLACE TRIGGER (Dilip Kumar)
Список
Дерево обсуждения
extension patch of CREATE OR REPLACE TRIGGER "Osumi, Takamichi" <osumi.takamichi@jp.fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER David Rowley <david.rowley@2ndquadrant.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "Osumi, Takamichi" <osumi.takamichi@jp.fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER David Steele <david@pgmasters.net>
Re: extension patch of CREATE OR REPLACE TRIGGER Thomas Munro <thomas.munro@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Michael Paquier <michael@paquier.xyz>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Surafel Temesgen <surafel3000@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Alvaro Herrera <alvherre@2ndquadrant.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Tom Lane <tgl@sss.pgh.pa.us>
Re: extension patch of CREATE OR REPLACE TRIGGER Michael Paquier <michael@paquier.xyz>
Re: extension patch of CREATE OR REPLACE TRIGGER Thomas Munro <thomas.munro@gmail.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Michael Paquier <michael@paquier.xyz>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Tom Lane <tgl@sss.pgh.pa.us>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Wolfgang Walther <walther@technowledgy.de>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Tom Lane <tgl@sss.pgh.pa.us>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Dilip Kumar <dilipbalaut@gmail.com>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Tom Lane <tgl@sss.pgh.pa.us>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
Re: extension patch of CREATE OR REPLACE TRIGGER Peter Smith <smithpb2250@gmail.com>
Re: extension patch of CREATE OR REPLACE TRIGGER David Steele <david@pgmasters.net>
RE: extension patch of CREATE OR REPLACE TRIGGER "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Hi, On Saturday, Nov 7, 2020 2:06 PM Dilip Kumar wrote: > The patch looks fine to me however I feel that in the test case there are a lot > of duplicate statement which can be reduced e.g. > +-- 1. Overwrite existing regular trigger with regular trigger > (without OR REPLACE) > +create trigger my_trig > + after insert on my_table > + for each row execute procedure funcA(); create trigger my_trig > + after insert on my_table > + for each row execute procedure funcB(); -- should fail drop trigger > +my_trig on my_table; > + > +-- 2. Overwrite existing regular trigger with regular trigger (with OR > +REPLACE) create trigger my_trig > + after insert on my_table > + for each row execute procedure funcA(); insert into my_table values > +(1); create or replace trigger my_trig > + after insert on my_table > + for each row execute procedure funcB(); -- OK insert into my_table > +values (1); drop trigger my_trig on my_table; > > In this test, test 1 failed because it tried to change the trigger function without > OR REPLACE, which is fine but now test 2 can continue from there, I mean we > don't need to drop the trigger at end of the > test1 and then test2 can try it with OR REPLACE syntax. This way we can > reduce the extra statement execution which is not necessary. OK. That makes sense. Attached the revised version. The tests in this patch should not include redundancy. I checked the tests of trigger replacement for partition tables as well. Here, I did not and will not delete the comments with numbering from 1 to 8 so that other developers can check if the all cases are listed up or not easily. Best, Takamichi Osumi
В списке pgsql-hackers по дате отправления
От: Andy Fan
Дата: