“42703” or “Column does not exist” Understanding the issue
I have trying to update the table RDS specific to postgrel with by inserting new attribute in class object.
The data would something like this after inserting or updating :
"class" : { "isPresent" : false }
Details :
Database : postgrel
Table name : student
Attributes for table : student_id, class
"class" attribute is of object type
This query works on my machine
update "student" set "class" = jsonb_set("class"::jsonb, '{isPresent}','false', true) WHERE "student_id" =1
When I'm trying to do the same query, on aws postgrel it does not work and throws an error query :
{
"query": "update student set class = jsonb_set('\"student.class\"'::jsonb, '{isPresent}','false', true) WHERE '\"student.student_id\"' = 1"
}
Error :
"column \"class\" of relation \"student\" does not exist"
When tried this, gives syntax erro :
{
"query": "update '\"student\"' set '\"class\"' = jsonb_set('\"student.class\"'::jsonb, '{isPresent}','false', true) WHERE '\"student.student_id\"' = 1"
}
I think the issue is syntax error : postgrel quotes syntax but have no idea how can I use double quotes under doble quotes