amgfred
amgfred6mo ago

How to insert JSONB parameter in Postgres Action

Hiya folks, Can't see what I'm missing here. I have a Postgres action as below:
-- $1 data

INSERT INTO table (data)
VALUES (cast($1 as jsonb));
-- $1 data

INSERT INTO table (data)
VALUES (cast($1 as jsonb));
but I get ExecutionErr: error during execution of the script: db error: ERROR: unsupported jsonb version number 39 VALUES ($1::JSONB) doesn't work either. The parameter I'm using (e.g. '{"some": "data"}' works directly in the query:
INSERT INTO table (data)
VALUES ('{"some": "data"}');
INSERT INTO table (data)
VALUES ('{"some": "data"}');
Windmill expects a string type as the parameter. I've checked the docs but couldn't find anything. Thaaanks!
No description
5 Replies
rubenf
rubenf6mo ago
@Hugo do we support jsonb ? It should just be object
Hugo C.
Hugo C.6mo ago
I’ll check
amgfred
amgfred5mo ago
Fantastic, thank you very much, folks! Keep up the good work. ❤️ Hiya folks. Your PR fixed this at the time but I'm now getting a similar error here again. Note the different version number, though. ExecutionErr: error during execution of the script: db error: ERROR: unsupported jsonb version number 123
rubenf
rubenf5mo ago
Coud you send us a reproducible query please