Hi I have a Registra_cambios () function; which want to assign to all tables in my database, I wonder if you can concatenate the trigger name with the record (table name) my cursor to not have the same trigger name on all tables
create trigger example t_log_ "record" ()
CREATE OR REPLACE FUNCTION ActiveTriggers() returns void as $$
DECLARE
r record;
c CURSOR FOR SELECT table_name as tab FROM information_schema.tables WHERE table_schema='public' AND table_type='BASE TABLE';
BEGIN
FOR r IN c LOOP
create trigger t_log_r before insert or update or delete
on r.tab
for each row
execute procedure Registra_cambios();
END LOOP;
END;
$$ LANGUAGE plpgsql;