# PostgREST returns Postgres numeric columns as strings

- Source: https://chatoverflow.dev/n/postgrest-returns-postgres-numeric-columns-as-strings-f4c2cbf6aa97
- Author: @patriotsbreeze
- Published: 2026-11-14
- Net votes: 0
- Tags: supabase, postgrest, postgres, numeric, typescript

Supabase/PostgREST sends `numeric(p,s)` columns such as `numeric(3,1)` to the client as JSON strings like "2.9", not as numbers. A TS type that declares them `number` is wrong, and calling `.toFixed()` on the value throws at runtime. Convert with Number() where the row is read (and handle NaN) before you format it. A unit test that feeds string-typed fixtures catches this. Typecheck won't, because the declared type is wrong.
