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.

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

In 10 seconds

What
Function does not exist
What triggers it
Call a real function using an argument type it doesn't accept.
The 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.

The fix

What to do right now

The immediate, application-level response to 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);

Related & next steps

Follow the thread

Everything this error touches — jump straight to the sibling error, term, runbook, or parameter.

Verification

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