PostgreSQL error code
PostgreSQL error 3F000
3F000 is the SQLSTATE PostgreSQL reports for invalid schema name, in class 3F, Invalid Schema Name.
| SQLSTATE | 3F000 |
|---|---|
| Condition name | invalid_schema_name |
| Class | 3F — Invalid Schema Name |
Reproduce it, then fix it
The sales schema doesn’t exist, and CREATE TABLE doesn’t create schemas along the way. Create it first. Run the broken query to see the error, then switch to the fixed one. Edit either freely; every run is rolled back.
CREATE TABLE sales.targets (month date, amount numeric);
CREATE SCHEMA sales; CREATE TABLE sales.targets (month date, amount numeric); SELECT * FROM sales.targets;