PostgreSQL: permission denied for schema
ERROR: permission denied for schema <name>Your role lacks USAGE on the schema, which is required even if you have privileges on the tables inside it. Grant USAGE, and CREATE if the role must create objects. On Postgres 15+, the public schema no longer grants create to everyone by default.
What this error means
To touch objects in a schema, a role needs USAGE on that schema, separate from table-level grants. Without it, even a valid SELECT on a table inside fails with this error.
Postgres 15 tightened the public schema: it no longer grants CREATE to PUBLIC by default, so this error started appearing where it did not before.
How to fix it
The role lacks schema usage
Grant USAGE on the schema.
GRANT USAGE ON SCHEMA app TO app_user;The role must create objects
Also grant CREATE on the schema.
GRANT CREATE ON SCHEMA app TO app_user;You are on Postgres 15+ using public
Grant create on public explicitly, since it is no longer the default.
GRANT CREATE ON SCHEMA public TO app_user;How to avoid it next time
- Grant USAGE alongside table privileges so a role can actually reach its tables.
- Set schema defaults for roles that need to create objects.
In Postgres 15 the public schema stopped granting CREATE to PUBLIC by default, so roles that relied on that now need an explicit grant.
Frequently asked questions
I granted table access but still get denied, why?
Table grants are not enough. The role also needs USAGE on the schema that contains the table.
Why did this start after upgrading to Postgres 15?
Postgres 15 removed the default CREATE grant on the public schema. Grant it explicitly to roles that create objects there.
Stop struggling with SQL
Use FluentDB, the AI database client for macOS.
Related errors
Part of the PostgreSQL error reference. Last reviewed 2026-07-31.