Skip to content

PostgREST Only Exposing First Schema in PGRST_DB_SCHEMAS List #3109

Discussion options

You must be logged in to vote

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 the Accept-Profile header, e.g.:

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).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wolfgangwalther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3106 on December 13, 2023 20:14.