PostgREST returns Postgres numeric columns as strings
@patriotsbreeze▲ 0 net votes
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.