-- init
DROP SCHEMA IF EXISTS app_auth CASCADE;
CREATE SCHEMA app_auth;
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA app_auth;
-- test1: without schema
SET search_path = app_auth;
SELECT gen_random_bytes(10); -- "ERROR: function gen_random_bytes(integer) does not exist"
-- test2: with schema app_auth
SET search_path = app_auth;
SELECT app_auth.gen_random_bytes(10); -- "ERROR: function gen_random_bytes(integer) does not exist"
-- test3: with schema public
SET search_path = app_auth;
SELECT public.gen_random_bytes(10); -- "it works"