SQLSTATE 3F000Severity lowLab verified

Incident brief

Schema does not exist

A CREATE TABLE statement referenced a schema name that doesn't exist yet. PostgreSQL rejected it instead of creating the schema implicitly.

Reproduced on PostgreSQL 16.14Verified 2026-07-16 (Docker lab, PostgreSQL 16.14)Reviewed by Verified against PostgreSQL 16.14 in an isolated lab environment

In 10 seconds

What
Schema does not exist
What triggers it
Run CREATE TABLE against an explicitly qualified schema name that has not been created.
The fix
Run CREATE SCHEMA first, then create the table inside it.
Proof
Reproduced on PostgreSQL 16.14 → CREATE TABLE against an explicitly qualified, nonexistent schema name was rejected with SQLSTATE 3F000.

The fix

What to do right now

The immediate, application-level response to this error.

  • Run CREATE SCHEMA first, then create the table inside it.
  • Don't assume adding the schema name to search_path is enough on its own — see the premium counterexample for what search_path actually does with a nonexistent entry.
Fix — SQL
CREATE SCHEMA batch9_orders_schema;
CREATE TABLE batch9_orders_schema.orders (id int);

Related & next steps

Follow the thread

Everything this error touches — jump straight to the sibling error, term, runbook, or parameter.

Verification

PG 16.14
Last verified
2026-07-16 (Docker lab, PostgreSQL 16.14)
Reviewed by
Verified against PostgreSQL 16.14 in an isolated lab environment
Audit status
reviewed