为什么我会收到“[42883] 错误:运算符不存在:未知 + 文本”响应?

问题描述

我有一个非常简单的函数,它接受 library(dplyr) newdata <- Probe.annotation.table %>% as_tibble() %>% column_to_rownames(var = "ID") _posttypeid 作为参数:

_url

如果我运行 CREATE FUNCTION rewrite(_postid integer DEFAULT NULL::integer,_url character varying DEFAULT NULL::character varying) RETURNS TABLE ( DestinationURL varchar,) LANGUAGE plpgsql AS $function$ BEGIN RETURN QUERY SELECT NULL AS PostTypeID,_url AS DestinationURL,FROM reference.destinations dest1 WHERE length(TRIM(dest1.DestinationURL)) > 0 AND _url LIKE '%' + TRIM(dest1.DestinationURL)) + '%' ORDER BY length(dest1.DestinationURL)) DESC LIMIT 1; END; $function$ 然后我得到这个错误

[42883] 错误:运算符不存在:未知 + 文本

提示:没有运算符匹配给定的名称和参数类型。您可能需要添加显式类型转换。

我清楚地将文本作为 select * from public.rewrite(_url := 'wikipedia.org') 参数的值传递。我不明白错误意味着什么,也不明白如何解决它。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)