Files
supabase/apps/studio/data
Joshen Lim 3e8d7fa795 Deprecate formatFilterValue, consistently use formatPatternMatchFilterValue across all table-row-operations (#51918)
## Context

Resolves https://github.com/supabase/supabase/issues/51827

Filtering a high-precision numeric column (e.g. `numeric(30,21)`) showed
the matching row, but the footer count said 0. We're currently using
`formatFilterValue` which coerced numeric filter values with `Number()`,
and rounds past ~15 digits so the generated = no longer matched the
stored value.

This same coercion was used by the count query, export
(`getAllTableRowsSql`) and delete-all but the main rows query
(`table-row-query`) never coerced, which is why rows and count
disagreed.

## Changes involved

- Given that `formatFilterValue` was legacy logic, opting to remove the
coercion and consistently use `formatPatternMatchFilterValue` instead
for all row operations as per what `table-row-query` uses, so filter
values reach Postgres as exact string literals.

## To test
- Run the following SQL statements to set up the table
  - `CREATE TABLE public.precise_values (amount numeric(30, 21));`
- `INSERT INTO public.precise_values VALUES (0.123456789012345678901);`
- In the Table Editor, filter amount = 0.123456789012345678901. The
footer should show 1 record and should match what's rendered in the
table
2026-10-20 11:25:20 +08:00
..
2026-09-11 12:17:49 +08:00
2026-08-13 09:48:13 +02:00
…
…
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00