sql - 错误格式的数组文字:必须引入明确指定的数组维度
问题描述
我有下一个查询:
UPDATE public.user_item
set instructions = concat('[', array_to_string(instructions::Text[], '", "')', ']')
where instructions is not null;
它失败并出现错误:
ERROR: malformed array literal: "["ERYTHRITOL, STEVIA LEAF EXTRACT, NATURAL FLAVORS."]"
DETAIL: "[" must introduce explicitly-specified array dimensions.
字段“说明”的类型是文本
解决方案
推荐阅读
- asp.net - 在 asp.net 中从 FTP 读取 .csv 文件
- firebase - Firebase 数据库规则允许更新但阻止创建
- ios - UITableView 滑动编辑
- javascript - TypeError:地图不是函数
- python - Python如何在方法调用中改变变量
- php - 使用 laravel 的背包填充嵌套下拉列表
- python - 在列表中制作列表:从单词列表中的单词制作单词列表
- javascript - 如何在渲染函数中访问道具
- javascript - 有没有办法告诉 babel 不要编译导入和导出语句?
- sql - 使用 Oracle 的外部表从 .csv 文件插入数据