SupabaseS
Supabase•4y ago
CanRau

Default `USER postgres search_path`

I did the following:

ALTER USER postgres SET search_path TO "$user", public, auth;


don't even remember exactly where and what for, just that it was based on a comment suggestion to "fix" something.

Now I'd like to reset it to default but I'm not sure what the default is supposed to be. I'm totally new to Postgres, have some experience with other SQL DBs 🤓

Found this

ALTER ROLE postgres SET search_path TO "\$user",public,extensions;

in https://github.com/supabase/supabase/blob/master/docker/volumes/db/init/03-post-setup.sql

Would that do? Or, if the value is actually correct better to do

ALTER USER postgres SET search_path TO "\$user",public,extensions;


Reading https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH, my last example might be the right one tho still not completely sure 😬
Was this page helpful?