I init app_auth database, create extension pgcrypto with app_auth schema, but tests show i create the extension into the public schema, why?
-- 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"
\dxwith psql.app_authto make the testSELECT app_auth.gen_random_bytes(10);always pass?