citext 是一个 contrib 模块,它提供了一个不区分大小写的字符类型,citext。
citext 添加于 PostgreSQL 8.4。
变更历史
- PostgreSQL 18 (1.8)
- PostgreSQL 13
- PostgreSQL 12 (1.6)
- 为
citext类型添加了 64 位哈希函数 (commit 48c41fa9)
- 为
- PostgreSQL 11 (1.5)
- 添加了
citext_pattern_ops(commit f2464997)
- 添加了
- PostgreSQL 10 (1.4)
- 添加了对
regexp_match()的支持 (commit f9d747a4)
- 添加了对
- PostgreSQL 9.6 (1.3)
- 添加了对并行查询的支持 (commit a89b4b1b)
- PostgreSQL 9.5 (1.1)
- 修复了
regexp_matches()函数,需要扩展版本号更新 (commit b22527f2)
- 修复了
- PostgreSQL 9.1 (1.0)
- PostgreSQL 8.4
- 已添加 (commit ab9907f5)
参考资料
- PostgreSQL 文档: citext
有用链接
- 可以在 citext 上使用排序规则吗? - 2025 年 9 月 Umut Tekin / CYBERTEC 的博客文章
- Postgres 扩展 - CITEXT 用于不区分大小写的列 - 2016 年 12 月 Brian Ambielli 的博客文章
