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.
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.