mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Docs update to correct frontmatter values in topics array to align with expected enums. In this case "REST-API" is not one of the excepted enum values for the topics array. Excepted values: ``` topics: z.array( z.enum([ 'ai', 'auth', 'branching', 'cli', 'database', 'functions', 'platform', 'realtime', 'self-hosting', 'storage', 'studio', 'supavisor', 'terraform', ]) ), ``` Added keywords for the additional value. ## What is the current behavior? These troubleshooting guides are not rendered in front-facing docs despite being available in the content/troubleshooting directory due to error validating troubleshooting metadata ## What is the new behavior? These troubleshooting guides are now rendered. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated frontmatter in troubleshooting guides: removed "rest-api" from topics and added a "REST API" keyword to improve content organization and searchability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Chandana Anumula <129955975+canumula@users.noreply.github.com>
25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
Plaintext
---
|
|
title = "PostgREST not recognizing the objects(tables/functions/views) in a schema even after adding it to the exposed schemas"
|
|
topics = [
|
|
"database",
|
|
"platform"
|
|
]
|
|
keywords = ["REST API"]
|
|
---
|
|
|
|
PostgREST is returning errors by not recognizing the objects(tables/functions/views) in a schema and logging errors similar to:
|
|
|
|
```
|
|
Could not find the table 'X' in the schema cache
|
|
```
|
|
|
|
## 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”](/docs/reference/javascript/initializing)) or specify the schema on each request using ".schema('your_schema')" (["Switching schemas per query"](/docs/reference/javascript/select))
|