select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SQLSTATE / CLASS 22 · DATA EXCEPTION

most_specific_type_mismatch

SQLSTATE
2200G
Condition name
most_specific_type_mismatch
Class
Data Exception
Source macro
ERRCODE_MOST_SPECIFIC_TYPE_MISMATCH
Evidence
Definition only
Analysis & operational context

English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗

<h1>2200G</h1>

At a glance

This condition names a most-specific-type mismatch during type resolution. No fixed PostgreSQL 18.6 emitting path was resolved in the bounded call scan, so the page stays conditional and does not turn a generic cast or operator error into 2200G.

Meaning

This condition concerns type selection when the most specific common type cannot be chosen for the operation.

Diagnosis

Use the full message and the expression or routine signature involved. Inspect unknown literals, polymorphic arguments, overloaded operators, and explicit casts at the point named by the diagnostic. If the server reports 42804 or 42846 instead, follow that actual code; a type mismatch by itself is not evidence for 2200G.

Response

Correct the named expression’s type resolution by making the intended type explicit or fixing the routine signature, after confirming the server’s actual SQLSTATE.

Versions

The locked catalogue records this condition from 7.4; fixed source coverage is PostgreSQL 18.6.

Sources

The fixed definition is confirmed; this bounded scan did not resolve a native emitting function to cite. The structured evidence record retains the definition, message, and scope boundaries. The catalogue definition is confirmed; an emitting function and message template were not resolved in this scan. A wrapper or extension may own a use, so preserve its actual context when investigating.

Source evidence

Evidence belongs to the frozen source and runtime versions listed here. It is not a runtime verification of the selected manual version.

2200G is most_specific_type_mismatch in SQLSTATE Class 22.

Method: Read fixed definition.

src.errcodes.18.6

No fixed PostgreSQL 18.6 emitting path was resolved for 2200G in the bounded source scan.

Method: Search fixed call records for the macro.

Limits: A bounded scan does not prove that no extension, wrapper, or historical path exists.

src.calls.REL_18_6

The condition name describes failure to choose a most-specific common type; unknown literals, polymorphic arguments, overloaded operators, and routine signatures are investigation targets, not evidence that a generic 42804/42846 is 2200G.

Method: Keep code identity separate from neighboring type errors.

Limits: No fixed primary/detail template was confirmed.

src.errcodes.18.6 src.calls.REL_18_6

The locked catalogue records 2200G from 7.4 without proving an exact implementation introduction date.

Method: Use catalogue boundary.

src.errcodes.18.6

Message templates

No extracted message template is attached to this condition.

Reproduction & repair cases

No reproduction case is attached to this condition.

Recorded runtime evidence

No runtime observation is attached to this entry.

Definition snapshot: english-manuals:c1a1c9b225a6ecf19cfbba1fb0a… · English manual source