WindmillWWindmill
Powered by
amgfredA
Windmill•2y ago•
6 replies
amgfred

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
ExecutionErr: error during execution of the script: db error: ERROR: unsupported jsonb version number 39

VALUES ($1::JSONB)
VALUES ($1::JSONB)
doesn't work either.
The parameter I'm using (e.g.
'{"some": "data"}'
'{"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
string
type as the parameter.
I've checked the docs but couldn't find anything.
Thaaanks!
image.png
WindmillJoin
3,388Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

We're live here https://discord.com/channels/930051556043276338/1278977038430240813

henri-c · 2d ago

rubenf

Infrastructure as code

rubenf · 3w ago

rubenf

As we're preparing for a new Windmill sandbox SDK, we took the opportunity **to open-source NSJAIL sandboxing** and make it available in CE and easier to set. In 1.634.0, just set nsjail to benefit from the tightest security and isolation per job. It's constraining so no need to use it unless you need but now you won't be restricted in security for CE if you need to.

rubenf · 4w ago

Similar Threads

How do I use a Windmill Postgres script to insert a date field?
Trevor SullivanTTrevor Sullivan / help
3y ago
How to pass sql query parameter
Ask InkeepAAsk Inkeep / help
2y ago
Database Manager JSONB Error
fooosieeeFfooosieee / help
2mo ago
Cannot convert between String and JSONB in PostgreSQL
ShenanigansSShenanigans / help
10mo ago