我在 Fedora 27 64 位上运行 PostgreSQL 9.6.8。当我执行此查询时:
UPDATE tbl SET textsearchable_index_col =
setweight(to_tsvector('french', coalesce("col1",'')), 'D') ||
setweight(to_tsvector('french', coalesce("col2",'')), 'D');
我收到此错误:
ERROR: cache lookup failed for function 3625
********** Error **********
ERROR: cache lookup failed for function 3625
SQL state: XX000
但是当我执行时:
UPDATE tbl SET textsearchable_index_col =
setweight(to_tsvector('french', coalesce("col1",'')), 'D');
或者
UPDATE tbl SET textsearchable_index_col =
setweight(to_tsvector('french', coalesce("col2",'')), 'D');
我得到:
Query returned successfully: 0 rows affected, 11 msec execution time.
我的问题是为什么它单独适用于任一列但在一起时不起作用?此链接显示应该可以在同一查询中使用两列(在第 12.3.1 节的末尾)。
编辑:这是系统为 Laurenz 的查询返回的内容。第一个查询返回
oprname | oprleft | oprright | oprcode
---------+----------+----------+----------
|| | tsvector | tsvector | 3625
第二个查询返回一个空结果集。