SQLSTATE 42883Severity mediumLab verified

Incident brief

Function does not exist

A function was called with an argument type it doesn't accept. PostgreSQL's overload resolution found no match, rather than silently coercing to something close.

What lands in your log

ERROR: function length(integer) does not exist

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

In 10 seconds

What triggers it
Call a real function using an argument type it doesn't accept.
Fix
Cast the argument to a type the function actually accepts.
Proof
Reproduced on PostgreSQL 16.14 → Calling length() with an integer argument was rejected with SQLSTATE 42883 and a HINT about explicit casts. The session was unaffected afterward.

Fix

What to do right now

Application-level steps for this error.

  • Cast the argument to a type the function actually accepts.
  • Check the function's documented signature rather than assuming every type is interchangeable.
  • Don't assume a cast like ::text is a universal fix, see the premium test for why the same cast can still fail on a different function.
Fix SQL
SELECT length(123::text);

Connected

Everything this error touches

Every page this SQLSTATE connects to: the concept that explains it, the runbooks that fix it, the parameters you tune to prevent it, and the sibling errors it travels with. All real cross-references. Jump straight in, or open the full interactive map.

Open in the interactive map →

Verification

PG 16.14
Last verified
2026-07-15 (Docker lab, PostgreSQL 16.14)
Verification scope
Verified against PostgreSQL 16.14 in an isolated lab environment
Audit status
reviewed
ShareLinkedInX

Went further?

Pro unlocks the second lab proof

Free page stops the bleeding. Pro adds the operational test, SQLSTATE audit, and deeper evidence, same error, more certainty.

FollowSubstackLinkedInnew errors · lab notes · hiring loops