U142: Object does not exist
Category: Application Errors
SQLSTATE: 42704 (Class 42 - Syntax Error or Access Rule Violation: undefined_object), and the related undefined_* codes
Urgency: low
SQLSTATE: 42704 (Class 42 - Syntax Error or Access Rule Violation: undefined_object), and the related undefined_* codes
Urgency: low
Example Postgres Log Output:
ERROR: role "app_readonly" does not exist
STATEMENT: GRANT SELECT ON mytable TO app_readonly;ERROR: type "myenum" does not exist at character 32
STATEMENT: ALTER TABLE mytable ADD COLUMN status myenum;ERROR: extension "pg_stat_statements" does not exist
STATEMENT: ALTER EXTENSION pg_stat_statements UPDATE;Explanation:
A statement referenced a database object that Postgres could not find. This is the catch-all classification for object kinds that do not have a classification of their own.
The most frequently seen object kinds have their own event types, and are not reported here:
- U119: Relation does not exist - tables, views, sequences and materialized views
- U120: Column does not exist
- U133: Function does not exist - also procedures and aggregates
- U121: Operator does not exist
- U134: No such savepoint - for
ROLLBACK TO SAVEPOINTon an undefined savepoint
Recommended Action:
Investigate the application code to determine why it’s attempting to access these missing objects.
Some common causes:
- For a missing type, extension or similar, the object may exist in a schema
that is not on the connection’s
search_path - A migration that has not been applied on this database
- Case sensitivity: unquoted identifiers are folded to lower case, so
CREATE ROLE "AppUser"must be referenced as"AppUser", not asAppUser.
If the reference is intentionally optional, many DROP commands accept IF EXISTS to avoid
the error entirely.
Learn More:

Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →