Change the schema exposed via PostgREST
# help
c
Change the schema exposed via PostgREST
As far as I understand, in a Supabase setup everything in the "public" schema is exposed via PostgREST. However, since the "public" schema is also the default schema in PostgreSQL (i.e. any statement which does NOT explicitly reference a schema, will use it), it is easy to accidentally expose internal data to the world via PostgREST. PostgREST allows specifying which schema to expose (https://postgrest.org/en/v7.0.0/configuration.html#db-schema) - can we use that in Supabase and change the schema which is exposed?
I guess the same goal can be achieved by changing the default schema for PostgreSQL itself to something other than public
I see that the latter can be achieved (https://stackoverflow.com/a/21790972/2606261), however, I think changing the PostgREST default API schema has a couple of advantages - so is that currently possible?
h
Currently this isn't possible
might be worth adding it to #867348150741237790 for the team
c
ok, thanks