Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update postgres `search_path`

Suciptoa99a89937ad3
diff --git a/docker/dockerfiles/postgres/00-initial-schema.sql b/docker/dockerfiles/postgres/00-initial-schema.sql
index ac346256d1f..98a5910f564 100644
--- a/docker/dockerfiles/postgres/00-initial-schema.sql
+++ b/docker/dockerfiles/postgres/00-initial-schema.sql
@@ -26,3 +26,5 @@ alter default privileges in schema public grant all on sequences to postgres, an
alter role anon set statement_timeout = '3s';
alter role authenticated set statement_timeout = '8s';
+
+ALTER ROLE postgres SET search_path = "$user", public, auth, extensions;
diff --git a/docker/dockerfiles/postgres/auth-schema.sql b/docker/dockerfiles/postgres/auth-schema.sql
index 1fab810cb39..b83e1ff4e35 100644
--- a/docker/dockerfiles/postgres/auth-schema.sql
+++ b/docker/dockerfiles/postgres/auth-schema.sql
@@ -88,6 +88,5 @@ $$ language sql stable;
GRANT ALL PRIVILEGES ON SCHEMA auth TO postgres;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA auth TO postgres;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA auth TO postgres;
-ALTER ROLE postgres SET search_path = "$user", auth, public;
GRANT USAGE ON SCHEMA auth TO anon, authenticated, service_role;