0F000
PostgreSQLERRORCriticalLocator ExceptionHIGH confidence
locator exception
What this means
SQLSTATE 0F000 is the generic locator exception code. In the SQL standard, locators refer to large object references (LOBs). Postgres raises this when an operation on a large object locator is invalid.
Why it happens
- 1Invalid operation on a PostgreSQL large object (lo_open, lo_read, lo_write, lo_close) using a stale or invalid OID
How to reproduce
Operating on a large object with an invalid descriptor.
trigger — this will error
trigger — this will error
SELECT lo_read(99999, 1024); -- invalid file descriptor
expected output
ERROR: locator exception
Fix
Use valid large object OIDs and descriptors
WHEN When working with PostgreSQL large objects (pg_largeobject).
Use valid large object OIDs and descriptors
-- Create a large object first, then use the returned OID: SELECT lo_create(0); -- returns OID -- Then open with lo_open() using that OID
Why this works
Ensure the large object OID exists in pg_largeobject before opening, and use the descriptor returned by lo_open() for subsequent operations.
Sources
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev