Single Schema vs. Multi Schema #3692
-
Hi guys, Based on this link, I've been assuming PostgREST is designed to only work with a single schema. However, this other link explains that a single PostgREST instance can be configured to access multiple schemas. I'm wondering why the schema isolation doc doesn't reference the option to have multiple schemas exposed to a single PostgREST instance. Is it considered a best practice to use the single schema approach... or is the multi schema approach not meant for beginners? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In a way, both are true. PostgREST will always work with a single schema only, but you can change per request which schema to use. What this means is, that when you expose multiple schemas, you can't cross-reference any objects (i.e. via embedding etc.) from other schemas. Personally, I think the way we currently expose multiple schemas is... annoying to deal with and not really that helpful. There is discussion in #2157 and #2166 around that. |
Beta Was this translation helpful? Give feedback.
In a way, both are true.
PostgREST will always work with a single schema only, but you can change per request which schema to use.
What this means is, that when you expose multiple schemas, you can't cross-reference any objects (i.e. via embedding etc.) from other schemas.
Personally, I think the way we currently expose multiple schemas is... annoying to deal with and not really that helpful. There is discussion in #2157 and #2166 around that.