mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 07:59:03 +00:00
## 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