Use the non-deprecated TG_TABLE_MAME in test trigger
Commit 3a9ae3d2068 (back in 2006) deprecated TG_RELNAME in favor of TG_TABLE_NAME, but the existing usage in test cases has remained till today. Change to use TG_TABLE_NAME instead (TG_RELNAME is still covered by a test case).
This commit is contained in:
parent
13cfa02f77
commit
44a184cb68
@ -701,7 +701,7 @@ create table trigtest (i serial primary key);
|
||||
create table trigtest2 (i int references trigtest(i) on delete cascade);
|
||||
create function trigtest() returns trigger as $$
|
||||
begin
|
||||
raise notice '% % % %', TG_RELNAME, TG_OP, TG_WHEN, TG_LEVEL;
|
||||
raise notice '% % % %', TG_TABLE_NAME, TG_OP, TG_WHEN, TG_LEVEL;
|
||||
return new;
|
||||
end;$$ language plpgsql;
|
||||
create trigger trigtest_b_row_tg before insert or update or delete on trigtest
|
||||
@ -987,7 +987,7 @@ begin
|
||||
argstr := argstr || TG_argv[i];
|
||||
end loop;
|
||||
|
||||
raise notice '% % % % (%)', TG_RELNAME, TG_WHEN, TG_OP, TG_LEVEL, argstr;
|
||||
raise notice '% % % % (%)', TG_TABLE_NAME, TG_WHEN, TG_OP, TG_LEVEL, argstr;
|
||||
|
||||
if TG_LEVEL = 'ROW' then
|
||||
if TG_OP = 'INSERT' then
|
||||
|
@ -444,7 +444,7 @@ create table trigtest2 (i int references trigtest(i) on delete cascade);
|
||||
|
||||
create function trigtest() returns trigger as $$
|
||||
begin
|
||||
raise notice '% % % %', TG_RELNAME, TG_OP, TG_WHEN, TG_LEVEL;
|
||||
raise notice '% % % %', TG_TABLE_NAME, TG_OP, TG_WHEN, TG_LEVEL;
|
||||
return new;
|
||||
end;$$ language plpgsql;
|
||||
|
||||
@ -680,7 +680,7 @@ begin
|
||||
argstr := argstr || TG_argv[i];
|
||||
end loop;
|
||||
|
||||
raise notice '% % % % (%)', TG_RELNAME, TG_WHEN, TG_OP, TG_LEVEL, argstr;
|
||||
raise notice '% % % % (%)', TG_TABLE_NAME, TG_WHEN, TG_OP, TG_LEVEL, argstr;
|
||||
|
||||
if TG_LEVEL = 'ROW' then
|
||||
if TG_OP = 'INSERT' then
|
||||
|
Loading…
x
Reference in New Issue
Block a user