# Postgres error 42804: column "x" is of type integer but expression is of type text

> A datatype mismatch: the value type does not match the target and Postgres will not convert it implicitly.

Source: https://scribase.com/postgres-errors/42804

SQLSTATE class: Syntax Error or Access Rule Violation. Over PostgREST/supabase-js this maps to HTTP 400.

## Causes

- Inserting a text parameter into a numeric, uuid or jsonb column without a cast.
- CASE branches or UNION columns with different types.

## Fixes

- Cast explicitly ($1::uuid, $2::jsonb).
- Make all branches of CASE or UNION return the same type.