You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
You may encounter a PGRST106 error, stating {"code":"PGRST106","message":"The schema must be one of the following: public"}, when attempting to query a schema via the PostgREST API that you've recently exposed.
Why This Happens:
This error occurs because the authenticator role's pgrst.db_schemas setting does not include the desired schema. This creates a conflict, as PostgREST relies on this setting to know which schemas it should expose.
How to Resolve This:
To fix this, you need to update the pgrst.db_schemas setting for the authenticator role. Connect to your database and execute one of the following SQL commands:
To explicitly add your schema:
If you want to add your specific schema (e.g., your_schema_name) alongside existing schemas (like public), use the following command. Remember to replace your_schema_name with your actual schema name and include all other necessary schemas already defined. ALTER ROLE authenticator SET pgrst.db_schemas = 'public, your_schema_name';
To reset to dashboard configuration:
Alternatively, you can reset this setting to allow the Supabase dashboard's configuration to take effect automatically. ALTER ROLE authenticator RESET pgrst.db_schemas;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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.
You may encounter a
PGRST106error, stating{"code":"PGRST106","message":"The schema must be one of the following: public"}, when attempting to query a schema via the PostgREST API that you've recently exposed.Why This Happens:
This error occurs because the
authenticatorrole'spgrst.db_schemassetting does not include the desired schema. This creates a conflict, as PostgREST relies on this setting to know which schemas it should expose.How to Resolve This:
To fix this, you need to update the
pgrst.db_schemassetting for theauthenticatorrole. Connect to your database and execute one of the following SQL commands:To explicitly add your schema:
If you want to add your specific schema (e.g.,
your_schema_name) alongside existing schemas (likepublic), use the following command. Remember to replaceyour_schema_namewith your actual schema name and include all other necessary schemas already defined.ALTER ROLE authenticator SET pgrst.db_schemas = 'public, your_schema_name';To reset to dashboard configuration:
Alternatively, you can reset this setting to allow the Supabase dashboard's configuration to take effect automatically.
ALTER ROLE authenticator RESET pgrst.db_schemas;All reactions