3 ms·
Use as many "base" schemas (namespaces) as needed, and only one `api` schema which has only views & functions you want to expose. I take this further by having
by claytonjy 6y ago
Use as many "base" schemas (namespaces) as needed, and only one `api` schema which has only views & functions you want to expose.
I take this further by having an `api` schema per major version (e.g. `api_v2`). The downside is it becomes impossible to maintain more than 2 major versions at once, so you have to get everyone from v1->v2 before you can make much progress on v3, but the upside is that you should really try to avoid hard breaking changes in the DB very often.