PostgREST not recognizing the objects(tables/functions/views) in a schema even after adding it to the exposed schemas
Last edited: 4/29/2026
PostgREST is returning errors by not recognizing the objects(tables/functions/views) in a schema and logging errors similar to:
1Could not find the table 'X' in the schema cacheWhy 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")