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