啓用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

相關文章
相關標籤/搜索