pg_icu_parser
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
pg_icu_parser | 1.0 | FTS | MPL-2.0 | C |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 2300 | pg_icu_parser | 否 | 是 | 否 | 是 | 否 | 是 | - |
SQL/control version 1.0; upstream release 1.0.0. Local RPM/DEB builds support PG14-18 with a PG18 encoding-API compatibility patch and explicit ICU linkage. ts_headline is unsupported. PIGSTY PG14-18 packages verified across EL8/9/10, Debian 12/13 and Ubuntu 22.04/24.04/26.04 on x86_64/amd64 and aarch64/arm64; all 16 platforms imported into the local PIGSTY repository.
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | pg_icu_parser | - |
| RPM | PIGSTY | 1.0.0 | 1817161514 | pg_icu_parser_$v | - |
| DEB | PIGSTY | 1.0.0 | 1817161514 | postgresql-$v-pg-icu-parser | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0.0 el8.x86_64.pg18 : pg_icu_parser_18 pg_icu_parser_18-1.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.0 el8.x86_64.pg17 : pg_icu_parser_17 pg_icu_parser_17-1.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.0 el8.x86_64.pg16 : pg_icu_parser_16 pg_icu_parser_16-1.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.0 el8.x86_64.pg15 : pg_icu_parser_15 pg_icu_parser_15-1.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.0 el8.x86_64.pg14 : pg_icu_parser_14 pg_icu_parser_14-1.0.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 1.0.0 el8.aarch64.pg18 : pg_icu_parser_18 pg_icu_parser_18-1.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.0 el8.aarch64.pg17 : pg_icu_parser_17 pg_icu_parser_17-1.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.0 el8.aarch64.pg16 : pg_icu_parser_16 pg_icu_parser_16-1.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.0 el8.aarch64.pg15 : pg_icu_parser_15 pg_icu_parser_15-1.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.0 el8.aarch64.pg14 : pg_icu_parser_14 pg_icu_parser_14-1.0.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 1.0.0 el9.x86_64.pg18 : pg_icu_parser_18 pg_icu_parser_18-1.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.0 el9.x86_64.pg17 : pg_icu_parser_17 pg_icu_parser_17-1.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.0 el9.x86_64.pg16 : pg_icu_parser_16 pg_icu_parser_16-1.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.0 el9.x86_64.pg15 : pg_icu_parser_15 pg_icu_parser_15-1.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.0 el9.x86_64.pg14 : pg_icu_parser_14 pg_icu_parser_14-1.0.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 1.0.0 el9.aarch64.pg18 : pg_icu_parser_18 pg_icu_parser_18-1.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.0 el9.aarch64.pg17 : pg_icu_parser_17 pg_icu_parser_17-1.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.0 el9.aarch64.pg16 : pg_icu_parser_16 pg_icu_parser_16-1.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.0 el9.aarch64.pg15 : pg_icu_parser_15 pg_icu_parser_15-1.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.0 el9.aarch64.pg14 : pg_icu_parser_14 pg_icu_parser_14-1.0.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 1.0.0 el10.x86_64.pg18 : pg_icu_parser_18 pg_icu_parser_18-1.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.0 el10.x86_64.pg17 : pg_icu_parser_17 pg_icu_parser_17-1.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.0 el10.x86_64.pg16 : pg_icu_parser_16 pg_icu_parser_16-1.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.0 el10.x86_64.pg15 : pg_icu_parser_15 pg_icu_parser_15-1.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.0 el10.x86_64.pg14 : pg_icu_parser_14 pg_icu_parser_14-1.0.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 1.0.0 el10.aarch64.pg18 : pg_icu_parser_18 pg_icu_parser_18-1.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.0 el10.aarch64.pg17 : pg_icu_parser_17 pg_icu_parser_17-1.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.0 el10.aarch64.pg16 : pg_icu_parser_16 pg_icu_parser_16-1.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.0 el10.aarch64.pg15 : pg_icu_parser_15 pg_icu_parser_15-1.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.0 el10.aarch64.pg14 : pg_icu_parser_14 pg_icu_parser_14-1.0.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 1.0.0 d12.x86_64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.0 d12.x86_64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.0 d12.x86_64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.0 d12.x86_64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.0 d12.x86_64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 1.0.0 d12.aarch64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.0 d12.aarch64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.0 d12.aarch64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.0 d12.aarch64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.0 d12.aarch64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 1.0.0 d13.x86_64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.0 d13.x86_64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.0 d13.x86_64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.0 d13.x86_64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.0 d13.x86_64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 1.0.0 d13.aarch64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.0 d13.aarch64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.0 d13.aarch64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.0 d13.aarch64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.0 d13.aarch64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 1.0.0 u22.x86_64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.0 u22.x86_64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.0 u22.x86_64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.0 u22.x86_64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.0 u22.x86_64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 1.0.0 u22.aarch64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.0 u22.aarch64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.0 u22.aarch64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.0 u22.aarch64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.0 u22.aarch64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 1.0.0 u24.x86_64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.0 u24.x86_64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.0 u24.x86_64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.0 u24.x86_64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.0 u24.x86_64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 1.0.0 u24.aarch64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.0 u24.aarch64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.0 u24.aarch64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.0 u24.aarch64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.0 u24.aarch64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 1.0.0 u26.x86_64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.0 u26.x86_64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.0 u26.x86_64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.0 u26.x86_64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.0 u26.x86_64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 1.0.0 u26.aarch64.pg18 : postgresql-18-pg-icu-parser postgresql-18-pg-icu-parser_1.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.0 u26.aarch64.pg17 : postgresql-17-pg-icu-parser postgresql-17-pg-icu-parser_1.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.0 u26.aarch64.pg16 : postgresql-16-pg-icu-parser postgresql-16-pg-icu-parser_1.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.0 u26.aarch64.pg15 : postgresql-15-pg-icu-parser postgresql-15-pg-icu-parser_1.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.0 u26.aarch64.pg14 : postgresql-14-pg-icu-parser postgresql-14-pg-icu-parser_1.0.0-1PGSTY~resolute_arm64.deb
|
构建
您可以使用 pig build 命令构建 pg_icu_parser 扩展的 RPM / DEB 包:
安装
您可以直接安装 pg_icu_parser 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
使用 pig 或者是 apt/yum/dnf 安装扩展:
创建扩展:
用法
来源:
pg_icu_parser 提供采用 ICU Unicode 单词边界分析的 icu_parser 全文搜索解析器。它适用于中文、日文、韩文和希伯来文等语言,因为 PostgreSQL 默认解析器以空白和模式为中心,可能无法产生合适的单词边界。
核心流程
服务器必须是 PostgreSQL 10 或更高版本,并且构建时已经启用 ICU。创建扩展后,建立使用该解析器的文本搜索配置,再映射所需的词元类型:
应为实际语言选择词典;上面的 english_stem 只用于演示映射语法。
解析器接口
word、number、kana、ideo和blank是icu_parser输出的词元类型。pg_icu_parser.locale选择 ICU locale,默认值为en。上游指出单词边界规则通常不依赖 locale,因此只有在验证了具体需求后才应修改。- 任意 PostgreSQL 文本搜索词典都可以映射到这些输出词元类型。
取舍
- 解析器要求 PostgreSQL 构建已经包含 ICU;创建扩展无法为未启用 ICU 的服务器补上该能力。
- 与默认解析器相比,它输出的词元类型更少、更粗,也不会把 URL、电子邮件等特殊模式识别为独立类别。
- 当前审阅的版本不支持
ts_headline。 - 上游报告其速度慢于默认解析器,而数据库编码为 UTF-8 时转换开销会较低。应在目标系统上用有代表性的文档和查询形态进行基准测试。
- 修改解析器映射或 locale 行为后,应重建已存储的
tsvector值和依赖索引,避免新旧行采用不同分词规则。
这个页面对您有帮助吗?
感谢反馈,我们会据此改进这篇文档。
哪里没有解决?(可选)