----------------
create table myTable (id serial primary key);
----------------
drop function if exists on_drop_proc cascade;
create function on_drop_proc() returns event_trigger as $$
begin
    raise notice 'Drop event!';
end;
$$ language plpgsql;
----------------
drop function if exists makeTriggers;
create function makeTriggers(n int) returns void as $$
declare 
    trgName varchar;
begin
    for i in 1..n loop
        trgName := concat('dropTrigger', i::varchar);
        execute format ('drop event trigger if exists %s;
                         create event trigger %s on sql_drop execute function on_drop_proc();'
                         , trgName, trgName, trgName);
    end loop;
end;
$$ language plpgsql;
----------------
select from makeTriggers(1000);
