Put warning in db-schema and clarify search_path

This commit is contained in:
steve-chavez
2020-04-21 15:16:21 -05:00
committed by Steve Chavez
parent 3328b6059f
commit ef36ec10a1
3 changed files with 13 additions and 8 deletions
+2 -5
View File
@@ -1421,18 +1421,15 @@ Switching Schemas
=================
You can switch schemas at runtime with the ``Accept-Profile`` and ``Content-Profile`` headers. You can only switch to a schema that is included in :ref:`db-schema`.
This is useful for **api versioning** and **schema-based multitenancy**.
The schema to be used can be selected through the ``Accept-Profile`` header for GET or HEAD:
For GET or HEAD, the schema to be used can be selected through the ``Accept-Profile`` header:
.. code-block:: http
GET /items HTTP/1.1
Accept-Profile: tenant2
If you don't specify the ``Accept-Profile`` header, the first schema on :ref:`db-schema` will be used.
For POST, PATCH, PUT, DELETE you can use the ``Content-Profile`` header for selecting the schema:
For POST, PATCH, PUT and DELETE, you can use the ``Content-Profile`` header for selecting the schema:
.. code-block:: http