Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CREATE INDEX message_fulltext_idx ON feedback USING gin(to_tsvector(message));
错误:索引谓词中的函数必须标记为 IMMUTABLE
如何避免这种情况?
You need to include the optional config parameter. Without it, the function is not immutable. For example, if you want the standard English text parsing:
CREATE INDEX message_fulltext_idx ON feedback USING gin(to_tsvector('english', message));