确认jsonb_path_query_array函数在PostgreSQL中的可用性: jsonb_path_query_array是PostgreSQL 12及更高版本中引入的函数,用于根据指定的JSON路径查询JSONB数据,并将结果以数组形式返回。 如果你使用的PostgreSQL版本低于12,那么该函数将不可用,从而导致undefinedfunction错误。 如果函数不存在,查找相应的替代方法或函数:...
\ \ File\ "/usr/lib/python3/dist\-packages/odoo/sql_db\.py",\ line\ 313,\ in\ execute \ \ \ \ res\ =\self\._obj\.execute\(query,\ params\) psycopg2\.errors\.UndefinedFunction:\ function\ jsonb_path_query_array\(jsonb,\ unknown\)\ does\ not\ exist LINE\ 1:\ \.\.\.I...
Release note (sql change): Add thejsonb_path_query_arrayfunction, which returns the result ofjsonb_path_querywrapped in a JSON array. builtins: add jsonb_path_query_first This commit adds thejsonb_path_query_firstfunction, which wraps jsonb_path_queryand returns the first element that was...