What it means
Postgres resolved the name you wrote and found no table or view by that name in the schemas it searched. The table may well exist: just not under that exact name, not in a schema on the search_path, or not in this database. Through the Supabase API the same situation shows up as PGRST205, HTTP 404.
Step 1: find where the table really is
select table_schema, table_name
from information_schema.tables
where table_name ilike '%profile%';
show search_path;
select to_regclass('public.profiles'); -- null means: no such tableRun this in the SQL Editor of the same project your app talks to. The answer points to one of the causes below.
The usual causes
- Different schema. The table is
app.profiles, but the query saysprofilesand the search path is"$user", public, extensions. Qualify the name (app.profiles). From supabase-js, usesupabase.schema('app').from('profiles')and addappto Exposed schemas in the API settings. - Upper-case letters in quotes. A table created as
"Profiles"(common with GUI tools and some ORMs) must always be written with quotes and the same case. UnquotedProfilesis folded toprofiles, which doesn't exist. Renaming it to lower case saves you from this forever:alter table "Profiles" rename to profiles; - A function with an empty search_path. Functions defined with
set search_path = ''(the recommended secure setting) see no schemas at all, so every name inside must be qualified:public.profiles, notprofiles. - The migration ran somewhere else. It ran locally or on staging, not on the project in your app's URL. Compare with
supabase migration list, thensupabase db pushto the right project. - A stale API schema cache (PGRST205 only). The table exists, but the API hasn't reloaded its view of the schema yet.
- Migration order. Migrations run in file-name (timestamp) order. A policy, view or foreign key in
20260101_policies.sqlthat refers to a table created in20260105_tables.sqlworks on a database where you ran things by hand, then fails onsupabase db resetor a fresh branch. Rename the file so the table is created first.
Fixes
-- 1. qualify the name
select * from app.profiles;
-- 3. qualify names inside functions that pin search_path
create or replace function public.profile_count()
returns bigint
language sql
stable
set search_path = ''
as $$
select count(*) from public.profiles;
$$;
-- 5. ask the API to reload its schema cache
notify pgrst, 'reload schema';Not this error
permission denied for table profilesmeans the table was found but the role has no GRANT on it.- An empty result means the table was found and RLS filtered the rows.
column "x" does not exist(42703) means the table is right and a column name is wrong, often the same quoting problem.
How to verify
select to_regclass('public.profiles'); returns the name rather than null, the query runs in the SQL Editor, and the same call from your app returns rows or an empty list instead of PGRST205. If the SQL Editor works but the app doesn't, compare the project URL in your app's environment with the project you are looking at.
Related guides
- Supabase “permission denied for table” – a missing GRANT, not a missing policy
- Supabase rpc “Could not find the function … in the schema cache” and “function does not exist”
- SECURITY DEFINER functions without a fixed search_path – the risk and the fix
- Postgres “new row for relation … violates check constraint” – find the rule and fix it
More in Postgres errors and performance · all guides