我正在使用 Postgresql 9.6,我想运行这样的查询:
\n\nselect post_id \nfrom comments \nwhere to_tsvector(\'pg_catalog.persian\', comments.body) @@ to_tsquery(\'pg_catalog.persian\', \'\xda\xa9\xd8\xaa\xd8\xa7\xd8\xa8\') ;\nRun Code Online (Sandbox Code Playgroud)\n\n但波斯语不在 postgresql 字典支持的语言之列:
\n\npostgres=# \\dF\n List of text search configurations\n Schema | Name | Description \n------------+------------+---------------------------------------\n pg_catalog | danish | configuration for danish language\n pg_catalog | dutch | configuration for dutch language\n pg_catalog | english | configuration for english language\n pg_catalog | finnish | configuration for finnish language\n pg_catalog | french | configuration for french language\n pg_catalog | german | configuration for german …Run Code Online (Sandbox Code Playgroud)