You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an interesting issue. I am reading from a database that uses a numeric field with large numbers in it (to the order of 1.8 x 10^18).
These numbers are written in by a Postgres script in a flow.
When accessing them in another flow, reading from the same table in another Postgres script the values are coming back rounded to the nearest hundred, if forced to show a more detailed value (for example using x.toFixed(0)) the number shows a shift. I assume this is a conversion error under the hood but I'm not sure where it's coming from.
The rounded number is what comes back in the json result of the Postgres query.
I'll provide examples for the particular example I am working with.
To reproduce
have a Postgres database with a "numeric" typed data column, with a large number.
e.g.
cell value:
1909198862420847982
attempt to read from that value from the database
select * from projects;
1909198862420847900
project_id.toFixed(0)
1909198862420847872
Expected behavior
The value returned from the Postgres query should be exactly what it is in the database.
Screenshots
Here are screenshots from a sql table gui, windmill's Postgres script and a subsequent bun script showing the result of various manipulation to the return value.
Browser information
No response
Application version
No response
Additional Context
running windmill CE v1.465.0
The text was updated successfully, but these errors were encountered:
my current work around is to create a new column where the number is forced to bigint (BigInt(xxxxxx)) and then encoded to base64 for it to then be pulled after, this is of course not ideal
Describe the bug
Hi,
I'm having an interesting issue. I am reading from a database that uses a numeric field with large numbers in it (to the order of 1.8 x 10^18).
These numbers are written in by a Postgres script in a flow.
When accessing them in another flow, reading from the same table in another Postgres script the values are coming back rounded to the nearest hundred, if forced to show a more detailed value (for example using x.toFixed(0)) the number shows a shift. I assume this is a conversion error under the hood but I'm not sure where it's coming from.
The rounded number is what comes back in the json result of the Postgres query.
I'll provide examples for the particular example I am working with.
To reproduce
have a Postgres database with a "numeric" typed data column, with a large number.
e.g.
cell value:
1909198862420847982
attempt to read from that value from the database
select * from projects;
project_id.toFixed(0)
Expected behavior
The value returned from the Postgres query should be exactly what it is in the database.
Screenshots
Here are screenshots from a sql table gui, windmill's Postgres script and a subsequent bun script showing the result of various manipulation to the return value.
Browser information
No response
Application version
No response
Additional Context
running windmill CE v1.465.0
The text was updated successfully, but these errors were encountered: