24 lines
603 B
PL/PgSQL
24 lines
603 B
PL/PgSQL
-- Verify numerus:ensure_role_exists on pg
|
|
|
|
begin;
|
|
|
|
select has_function_privilege('auth.ensure_role_exists()', 'execute');
|
|
|
|
select 1 / count(*)
|
|
from pg_trigger
|
|
where not tgisinternal
|
|
and tgname = 'ensure_role_exists'
|
|
and tgrelid = 'auth.user'::regclass
|
|
and tgtype = b'00010101'::int;
|
|
-- │││││││
|
|
-- ││││││└─> row
|
|
-- │││││└──> before
|
|
-- ││││└───> insert
|
|
-- │││└────> delete
|
|
-- ││└─────> update
|
|
-- │└──────> truncate
|
|
-- └───────> instead
|
|
|
|
|
|
rollback;
|