42939ERRORTier 2 — Caution✅ HIGH confidencereserved name
What this means
SQLSTATE 42939 is raised when an object is being created with a name that is reserved by the system — for example, trying to create a schema named "information_schema" or a table in the pg_catalog schema.
Why it happens
- 1Attempting to create an object with a name reserved for system use (e.g., pg_* schemas, information_schema)
- 2Trying to create a schema or table that conflicts with a system-reserved name
How to reproduce
Creating a table with a reserved system name.
CREATE TABLE pg_tables (id INT); -- reserved system nameFix 1: Choose a non-reserved name for the object
When a naming conflict with system objects is detected.
CREATE TABLE app_tables (id INT); -- non-reserved nameWhy this works
Avoid names starting with pg_ (reserved for system use) and avoid names matching system catalogue views and schemas.
What not to do
Try to create objects in pg_catalog or information_schema
Why it's wrong: These schemas are reserved for Postgres system objects and cannot be modified.
Sources
📚 Official docs: https://www.postgresql.org/docs/current/errcodes-appendix.html
🔧 Source ref: Class 42 — Syntax Error or Access Rule Violation
Confidence assessment
✅ HIGH confidence
Standard SQLSTATE for reserved name conflicts. Stable across versions.
See also
🔗 Related errors
📄 Reference pages