↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / SQLSTATE

2200G — most_specific_type_mismatch

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.

English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

aliases
Unknown
class name
Data Exception
condition name
most_specific_type_mismatch
lang
en
sqlstate
2200G

Definition PG 18

2200G

At a glance {#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 {#meaning}

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

Diagnosis {#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 {#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 {#versions}

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

Related {#related}

22003, 42804

Sources {#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.

Compare versions

SQLSTATE evidence and recorded runtime versions

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read fixed definition.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "2200G is most_specific_type_mismatch in SQLSTATE Class 22."
}
claims · bounded-scan
{
  "claim_id": "bounded-scan",
  "limits": "A bounded scan does not prove that no extension, wrapper, or historical path exists.",
  "method": "Search fixed call records for the macro.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.calls.REL_18_6"
  ],
  "statement": "No fixed PostgreSQL 18.6 emitting path was resolved for 2200G in the bounded source scan."
}
claims · meaning-boundary
{
  "claim_id": "meaning-boundary",
  "limits": "No fixed primary/detail template was confirmed.",
  "method": "Keep code identity separate from neighboring type errors.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6",
    "src.calls.REL_18_6"
  ],
  "statement": "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."
}
claims · history
{
  "claim_id": "history",
  "limits": "",
  "method": "Use catalogue boundary.",
  "position": 3,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "The locked catalogue records 2200G from 7.4 without proving an exact implementation introduction date."
}
sources · src.errcodes.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/errcodes.txt",
  "position": 0,
  "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
  "source_id": "src.errcodes.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L194"
}
sources · src.calls.REL_18_6
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_18_6.jsonl",
  "position": 1,
  "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
  "source_id": "src.calls.REL_18_6",
  "tag": "",
  "url": ""
}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · english-manuals:acb3fef3a16b614e46feabd366f0b2438932a416e73b2c6d628666d15a5e4da5

Text language: en · english-manuals:acb3fef3a16b614e46feabd366f0b2438932a416e73b2c6d628666d15a5e4da5