postgresql - 错误 : op ANY/ALL (array) requires array on right side

标签 postgresql

我们正在调用过程 public.update_records (p_record_id integer, p_notification_list text) 并将 p_notification_list 值分配为

ct.new_notification_id::text = ANY(string_to_array(p_notification_list,',')) 

传递给p_notification_list的值为'<notification_id_1>','<notification_id_2>'等等

并得到错误,因为 op ANY/ALL (array) requires array on right side

请推荐

最佳答案

对我有用:

regress=> SELECT 'a' = ANY (string_to_array('a,b,c', ','));
 ?column? 
----------
 t
(1 row)

所以我认为这个问题没有显示出任何问题。这就是为什么您需要显示完整语句、您的 Pg 版本、表定义等。

关于postgresql - 错误 : op ANY/ALL (array) requires array on right side,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25106853/

相关文章:

laravel - 在查询中过滤(搜索引擎)的最佳方法

java - 连接 Amazon RDS 上的顶级 PostgreSQL 9.3.1 时 Hibernate/JDBC 挂起

ruby-on-rails - 复杂嵌套 SUM/子选择

javascript - PostgreSQL 字符串比较

postgresql - 尝试使用 Postgresql 连接到 Amazon RDS 时出错

sql - 在 postgresql 中更改多行

sql - PostgreSQL——如何生成具有外键约束的随机行数的假数据?

ruby-on-rails - 使用 --database=postgresql 时 Rails postgres 默认数据库用户

postgresql - 如何在 JPA 中映射整数数组

sql - 使用 COPY 在 postgresql 表中插入附加列值(文件中不可用)