-- una base de pruebas
create database prueba;

-- tablas para la prueba
create table a (col1 int);
create table b (col1 int);
create table c (col1 int);

-- la funcion del trigger
create or replace function prueba_trigger() returns trigger as $$
begin
   raise notice 'starting trigger in %', tg_table_name;
   if tg_table_name = 'a' then
           insert into b values(1);
   elsif tg_table_name = 'b' then
           insert into c values(1);
   end if;
   raise notice 'finishing trigger in %', tg_table_name; 
   return new;
end
$$ language plpgsql;

-- los triggers
create trigger trg_after_a after insert on a for each row execute procedure prueba_trigger();
create trigger trg_after_b after insert on b for each row execute procedure prueba_trigger();
create trigger trg_after_c after insert on c for each row execute procedure prueba_trigger();

-- la prueba
insert into a values (1);