© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
Riebel

How to programmatically expose a custom schema?

I have a multi tenant app and would like to use the schema per tenant pattern.
I am dynamically creating new schemas by database triggers and grant usage and privileges.
On client side I create a new client which is using the new schema and all works fine as long as I manually add the schema to Settings->API->Exposed schemas

Is there any way I can expose the schema programmatically / dynamically when creating the schema in the triggered function?

There is a PostgREST setting for that https://postgrest.org/en/stable/configuration.html#db-schemas, but i have no clue how to set it from within the database.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Expose custom schema without the UI?
SupabaseSSupabase / help-and-questions
7mo ago
How to expose a schema with a sql query ?
SupabaseSSupabase / help-and-questions
13mo ago
Expose Schema via SQL Query
SupabaseSSupabase / help-and-questions
5mo ago
How to create & edit a custom schema in superbase?
SupabaseSSupabase / help-and-questions
4y ago