clusters_v2=# UPDATE cluster SET "clusterCALogs" = "clusterCALogs" || '["test"]'::jsonb WHERE "clusterId" = 9;
ERROR: operator does not exist: json || jsonb
LINE 1: ...ATE cluster SET "clusterCALogs" = "clusterCALogs" || '["test...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
根据https://stackoverflow.com/a/42233548/1663462我应该能够附加到 JSON 数组?为什么我会收到此错误?
我的列类型
"clusterCALogs"
是json
......它必须是jsonb
。