Updating a JSONB column in Postgres


I’m getting a very weird error that I’m not sure how to solve.
I have a workflow that retrieves information from ClickUp and then inserts into postgres.
Clickup has many fields stored as a json string.
For json arrays I used a javascript node and the JSON.stringify function to convert them into values that could be inserted into my postgres table.
The insert works perfectly now.

However, when I’m trying to do an update operation in postgres, using the exact same workflow to transform my data before updating it, I get the error
ERROR: column “my_column” is of type jsonb but expression is of type text

I tried the stringify function on the column but it is not working.
I also used the javascript node to convert some dates from Unix timestamp to the format I’m using in postgres but I also get the error saying that the field is expecting date time but is receiving text.

Appreciate any advice on how I could solve this or debug it.


There might be a bug in postgres update function.
This solved my issue: Postgresql update bug? - #6 by Kyano_Kashi
I was required to cast the variables that were having issues.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.