I have this simple query to a table that contains a column of type bigint.
However when I query it, pg-promise returns this column\'s values as a strin
Another alternative, specifically if you're using JavaScript without BigInt support, is to cast the value to an int in the SQL query, as such:
var ids = [180, 120];
// Cast id_brand to an int to ensure it is not parsed as a string.
db.any('SELECT id_brand::int, brand from catalog_brand WHERE id_brand in ($1:csv)', [ids])
.then((data) => {
// return results
});
Of course, this does not help you if id_brand has values larger than the maximum int.