为什么80%的码农都做不了架构师?>>>
如下
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 EXECUTE
解决办法 :
把权限改成postgres的用户即可
chown -R postgres:postgres /usr/pgsql-9.6/share/tsearch_data/
再执行
CREATE EXTENSION zhparser;
成功
灵感来自于
https://blog.csdn.net/qadzhangc/article/details/88074521