尝试更新jsonb列中嵌套数组的所有元素,但只更新一个元素。我的问题是: set value_ = jsonb_set(value_,cte.json_path,cte.namevalue,false) FROM (
select'{iProps,'||index1-1||',value,rules,'||index2-1||',ao,sc}')::text[] as json_
我在spring应用程序中使用EntityManager来获得这个查询的结果。select (c.data::jsonb)->>'employee_Id' as empId from employee e where e.dept ='employee' and (e.data::jsonb)->>'section_id' = '1235'
它为我提供了正确的PgA
select jdoc -> 'members' ->'coach' from api where id = 22; 返回:{"id":11,"name":“一个花花公子”} 尝试更新嵌套对象,但失败update api set jdoc = jsonb_set(jdoc, '{members,coach,id}', 21) where id = 22; 错误: No function matches那么,我哪里出错</