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 have a Numeric field with configured precision of 2.
When i configure this Field to be saved as a Column instead of JSON in PostgreSQL, the column will be created as follows:
the first value defines the total length of the value and the second one the decimal places.
so NUMERIC(2,0) accepts 0-99
when i change it to NUMERIC() it just works with whatever is configured in Corteza.
Expected Behavior
Numeric fields should be defined correctly in postgreSQL if saved as column.
I think it would be just fine to leave the check logic to corteza and store the column as simple NUMERIC()
Steps To Reproduce
create module
create Numeric field with defined precision
change the storage of the field to "Column" instead of "JSON"
try to save any value bigger then the defined precision (precision:2 -> try save 100)
Environment and versions
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Version of Corteza
2023.9.8
Current Behavior
I have a Numeric field with configured precision of 2.
When i configure this Field to be saved as a Column instead of JSON in PostgreSQL, the column will be created as follows:
This is wrong, when i try to insert any number bigger then 2 digts (f.e. 100) it will raise an error: "pq: numeric field overflow"
According to the psql Doc: https://www.postgresql.org/docs/current/datatype-numeric.html
the first value defines the total length of the value and the second one the decimal places.
so NUMERIC(2,0) accepts 0-99
when i change it to NUMERIC() it just works with whatever is configured in Corteza.
Expected Behavior
Numeric fields should be defined correctly in postgreSQL if saved as column.
I think it would be just fine to leave the check logic to corteza and store the column as simple NUMERIC()
Steps To Reproduce
Environment and versions
Anything else?
No response
The text was updated successfully, but these errors were encountered: