camper/verify/ensure_role_exists.sql

23 lines
709 B
MySQL
Raw Normal View History

-- Verify camper:ensure_role_exists on pg
begin;
select has_function_privilege('camper.ensure_role_exists()', 'execute');
select 1 / count(*)
from pg_trigger
where not tgisinternal
and tgname = 'ensure_role_exists'
and tgrelid = 'camper.company_user'::regclass
and tgtype = b'00010101'::int;
-- │││││││
-- ││││││└─> row
-- │││││└──> before
-- ││││└───> insert
-- │││└────> delete
-- ││└─────> update
-- │└──────> truncate
-- └───────> instead
rollback;