How to use % operator from the extension pg_trgm?

自古美人都是妖i 提交于 2019-11-29 15:02:11
Erwin Brandstetter

Most probably this is a problem with the search_path. Run:

SHOW search_path;

Is the schema where you installed pg_trgm included? If not, include it.

Alternatively, you can schema-qualify functions - and even operators using the OPERATOR() construct:

SELECT * FROM rssdata WHERE extensions.similarity(description, 'Brazil') > .8;
SELECT * FROM rssdata WHERE description OPERATOR(extensions.%) 'Brazil';

Makes it independent from the search_path.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!