我有一个citext名为的列email,还有一个tsvector名为search进行全文搜索的列。我的触发器是这样的:
tsvector_update_trigger(search_vector, 'pg_catalog.english', name, email)
name只是一个普通的text列。但是,因为emailis citextwhich 是文本,但不区分大小写,所以触发器似乎不起作用。我有错误提到email不是“字符类型”。我想知道为什么 Postgres 难以将 citext 视为文本或转换为文本并进行其标记化业务?
如何email保持citext全文搜索?