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