create table p (id int,
primary key (id))
partition by range (id);
create table pb
partition of p
for values from (1)
to (10)
partition by range (id);
create table p1
partition of pb
for values from (1)
to (5);
create function f ()
returns trigger as 
$$ begin
return new;
end;$$
language plpgsql;
create trigger a
after insert  on p
for each row
execute procedure f();
select tgrelid::regclass, * from pg_trigger where tgname = 'a';

alter trigger a on p rename to b;
select tgrelid::regclass, * from pg_trigger where tgname = 'a';
select tgrelid::regclass, * from pg_trigger where tgname = 'b';
