启用zhparser插件时一直报Permission denied

以下sql

 

postgres=# CREATE EXTENSION zhparser;
ERROR:  could not open file "/usr/pgsql-9.6/share/tsearch_data/qc_dict_postgres.txt" for writing: Permission denied
CONTEXT:  SQL statement "copy (select word, tf, idf, attr from zhparser.zhprs_custom_word) to '/usr/pgsql-9.6/share/tsearch_data/qc_dict_postgres.txt' encoding 'utf8'"
PL/pgSQL function sync_zhprs_custom_word() line 11 at EXECUTEpost

 

解决办法 :.net

把权限改为postgres的用户便可blog

 chown -R postgres:postgres /usr/pgsql-9.6/share/tsearch_data/get

再执行it

CREATE EXTENSION zhparser;io

成功function

灵感来自于coding

https://blog.csdn.net/qadzhangc/article/details/88074521file

相关文章
相关标签/搜索