I have window function which uses ROW_NUMBER. It returns bigint, but postgres.js converts it into a string. However, id field, which is int, is, in fact, a number in JSON:
SELECT row_number() over (order by id) * 100 as row_num,
id
FROM clients.client;
PostgreSQL shows that row_num is bigint and id is int:
If I explicitly convert to int, then all goes fine:
SELECT (row_number() over (order by id) * 100) :: int as row_num,
id
FROM clients.client;

I have window function which uses
ROW_NUMBER. It returnsbigint, but postgres.js converts it into a string. However,idfield, which isint, is, in fact, a number in JSON:PostgreSQL shows that
row_numisbigintandidisint:If I explicitly convert to
int, then all goes fine: