PostgREST not recognizing the objects(tables/functions/views) in a schema even after adding it to the exposed schemas #45145
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is a copy of a troubleshooting article on Supabase's docs site. It may be missing some details from the original. View the original article.
PostgREST is returning errors by not recognizing the objects(tables/functions/views) in a schema and logging errors similar to:
Why this happens
When multiple schemas are exposed, the first entry in the list is treated as the default, so PostgREST resolves unqualified object names only against that schema.
This behavior is intentional, as it prevents conflicts when different schemas contain objects with the same name.
How to fix this
If you want to use the objects without specifying a schema, you'd need to put it first. Else, you should initialise the Supabase client with the schema(”With custom schemas”) or specify the schema on each request using ".schema('your_schema')" ("Switching schemas per query")
All reactions