Closed andyk closed 1 year ago
JavaScript does not support bigint. You can cast to a string.
supabase.from('table_name').select('id, num::text');
Makes sense. Could the lib check the column type and throw an error instead of returning incorrect values?
Thanks @andyk - let's track this on https://github.com/supabase/postgrest-js/issues/319.
Sounds great
Bug report
Describe the bug
The value returned by the javascript supabase lib for a column of type bigint is wrong for large integer values. It seems to be rounded. Maybe because of overflow in javascript's numeric type.
Maybe related to supabase/supabase#13612.
Here is my code in my Create React App:
(screenshot of code)
Here is the result in my browser console:
Here is my table in supabase
But if (per the advice in this stackoverflow post) i change the code to:
the values returned from the lib seems correct
Env
Additional context