synth
synth copied to clipboard
bug: generating numeric for postgres gives 'invalid sign' error
Describe the bug
When filling a numeric
postgres column I am getting an 'invalid sign' error.
To Reproduce Steps to reproduce the behavior:
- Schema (postgres)
CREATE TABLE test
(
length numeric
)
- Schema (Synth)
{
"type": "array",
"length": 1,
"content": {
"type": "object",
"length": {
"type": "number",
"subtype": "f64"
}
}
}
- See error
Error: At namespace "numeric"
Caused by:
0: Failed to insert data for collection test
1: One or more database inserts failed: error returned from database: invalid sign in external "numeric" value: invalid sign in external "numeric" value
- Error (postgres logs)
2021-12-23 07:43:56.503 UTC [104] ERROR: invalid sign in external "numeric" value
2021-12-23 07:43:56.503 UTC [104] CONTEXT: unnamed portal parameter $1
2021-12-23 07:43:56.503 UTC [104] STATEMENT: INSERT INTO test (length) VALUES
($1);
Expected behavior
According to the postgres integration page I expect to be able to fill a numeric
postgres column with a f64
synth type.
Environment (please complete the following information):
- OS: Linux
- Version: 0.6.2
Additional context A successful fix should restore this e2e test
I haven't created another issue since this is the exact same problem I'm facing.
Is there any workaround for this @chesedo ?
It's a critical point for our test data to use numeric type in a certain column and if there's no solution to pass this, we will need to abandon using Synth completely.
I would very much appreciate any input on this issue.
Thank you!