Put warning in db-schema and clarify search_path
This commit is contained in:
committed by
Steve Chavez
parent
3328b6059f
commit
ef36ec10a1
+10
-2
@@ -75,12 +75,12 @@ db-schema
|
||||
|
||||
The database schema to expose to REST clients. Tables, views and stored procedures in this schema will get API endpoints.
|
||||
|
||||
The chosen schema gets added to the `search_path <https://www.postgresql.org/docs/11/ddl-schemas.html#DDL-SCHEMAS-PATH>`_ of every request. Example:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
db-schema = "api"
|
||||
|
||||
This schema gets added to the `search_path <https://www.postgresql.org/docs/11/ddl-schemas.html#DDL-SCHEMAS-PATH>`_ of every request.
|
||||
|
||||
You can also specify a list of schemas that can be used for **schema-based multitenancy** and **api versioning** by :ref:`multiple-schemas`. Example:
|
||||
|
||||
.. code:: bash
|
||||
@@ -89,6 +89,14 @@ db-schema
|
||||
##or
|
||||
##db-schema = "v1, v2"
|
||||
|
||||
.. warning::
|
||||
|
||||
Never expose private schemas in this way. See :ref:`schema_isolation`.
|
||||
|
||||
If you don't :ref:`Switch Schemas <multiple-schemas>`, the first schema in the list(``tenant1`` in this case) is chosen as the default schema.
|
||||
|
||||
Only the chosen schema gets added to the `search_path <https://www.postgresql.org/docs/11/ddl-schemas.html#DDL-SCHEMAS-PATH>`_ of every request.
|
||||
|
||||
.. _db-anon-role:
|
||||
|
||||
db-anon-role
|
||||
|
||||
Reference in New Issue
Block a user