PostgREST Only Exposing First Schema in PGRST_DB_SCHEMAS List #3109
-
Environment
Description of issueThe following is a sample from my docker-compose file:
Expected Behavior: Actual Behavior: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The API only accesses one schema at a time. By default it's the first one in the list. For example, in order to get a table from curl "http://localhost:3000/table" -H "Accept-Profile: schema2" See the Schema section in the docs for more info. The OpenAPI output also needs to be accessed using the "Accept-Profile" header, otherwise it will show info for the first schema by default. Nginx can help you in defining different locations for each schema (by adding that header to their respective location). |
Beta Was this translation helpful? Give feedback.
The API only accesses one schema at a time. By default it's the first one in the list. For example, in order to get a table from
schema2
, you need to specify it in theAccept-Profile
header, e.g.:See the Schema section in the docs for more info.
The OpenAPI output also needs to be accessed using the "Accept-Profile" header, otherwise it will show info for the first schema by default. Nginx can help you in defining different locations for each schema (by adding that header to their respective location).