42883 — Undefined function
42883 — Undefined function
At a glance
42883 is undefined_function: lookup found no compatible function for the requested name and input types. The same condition is also used by the parser’s undefined-operator branch. The case calls a schema-qualified integer function signature before it exists.
| Field | Value |
|---|---|
| SQLSTATE | 42883 |
| Condition | undefined_function |
| Status | active |
| Known present by | 7.4 |
| Locked snapshots | 9.0.23, 9.1.24, 9.2.24, 9.3.25, 9.4.26, 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3 |
| Macros | ERRCODE_UNDEFINED_FUNCTION |
| Aliases | — |
Meaning
The parser resolves name, schema visibility, input types, and overloads together. The selected function group reports function %s does not exist and hints that no function matches the name and argument types; a sibling parse_oper.c branch reports operator does not exist: %s with the corresponding operator hint under the same SQLSTATE. Distinguish 42725 (candidates but ambiguous) and 42846 (a chosen expression cannot be cast). Inspect pg_proc/identity arguments for functions and pg_operator plus operand types for operators. An extension-provided routine or operator may simply be unavailable on this server or version, so availability is part of the diagnosis.
Diagnosis
Capture the fully rendered name and signature. Query pg_proc with pg_get_function_identity_arguments for functions, and inspect pg_operator and both operand types for operators. Verify current_schema and search_path without assuming a different path is correct; check whether the object is a function, procedure, operator, or extension-provided feature. For extension/version candidates, inspect installed extension metadata and server_version_num before changing SQL.
Response
Call the intended signature explicitly, or create that exact function in the intended schema when you own the API. If the missing object is supplied by an extension or newer server feature, install or enable the intended dependency only when it is part of the deployment contract; do not create a substitute merely because the lookup failed. Do not blindly alter search_path or add casts, since they can select another routine or operator. The case creates missing_function(integer) and returns 42. In an explicit transaction, the error leaves INERROR until rollback or a suitable savepoint; the selected autocommit error leaves IDLE.
Observed diagnostics
The selected parser function group is explicit ERROR: primary function %s does not exist, hint No function matches the given name and argument types. You might need to add explicit type casts. The source-only operator group is also ERROR: primary operator does not exist: %s; with two known operand types its hint is No operator matches the given name and argument types. You might need to add explicit type casts., while a missing operand uses the singular type form. These are distinct producers sharing 42883.
Representative case
The runner calls the missing schema-qualified function, checks the expanded signature and state, creates the exact integer signature, and repeats the call.
The selected 18.6 and 10.21 runs passed SQLSTATE, severity, state/recovery, repair, cleanup, and isolated-target stop assertions. See case JSON and authored evidence; private manifest and registry hashes are recorded there.
Versions
The locked catalogue contains this condition from the 7.4 presence bound through the listed snapshots. The selected natural case passed on PostgreSQL 18.6 and 10.21; that bounded result does not infer every intermediate release or every source branch.
Related
Sources
src.errcodes.REL_18_6— fixed definition at724edf9bde9d356724ad384a2e196edc3c9f80f7; SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba(source).src.undefined-function.18.6—src/backend/parser/parse_func.clines 629–636 at724edf9bde9d356724ad384a2e196edc3c9f80f7; blob SHA-25648314eab022297478ac4e49786afaff2621ab7b1d7b50e156668cf477961384f(source).src.undefined-function.10.23—src/backend/parser/parse_func.clines 521–528 at02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4; blob SHA-256f1b4af88565ca01dbad2b244cd26b42f34764b3f1343b22a9231e271fb0742f2(source).src.undefined-operator.18.6—src/backend/parser/parse_oper.clines 619–644 at724edf9bde9d356724ad384a2e196edc3c9f80f7; blob SHA-2563866ce3302c2a4bd22d0f1d113a4bbc627278a618d5e7b83660e36240cbdd0a8(source).src.undefined-operator.10.23—src/backend/parser/parse_oper.clines 706–728 at02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4; blob SHA-2565802db6d55bdb41f9cad4957384fa2c2ddbb4dc902c33f5f57e8a07760761d10(source).src.calls.REL_18_6/src.calls.REL_10_23— fixed call scans, SHA-2569ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf/00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c.manifest.42883/snippet-registry.42883— hashes are recorded inevidence/42883.jsonand each runtime record.