ts_token_type()
是一个系统函数,它返回一个包含指定解析器可识别的每种 token 类型描述的表。
ts_token_type()
添加于 PostgreSQL 8.3。
用法
ts_token_type (parser_name
text
) →
setof record (tokid
integer
,alias
text
,description
text
)
ts_token_type (parser_oid
oid
) →
setof record (tokid
integer
,alias
text
,description
text
)
ts_token_type()
主要用于允许直接测试全文搜索解析器。
变更历史
- PostgreSQL 8.3
- 添加(提交 140d4ebc)
示例
ts_token_type()
的基本用法示例
postgres=# SELECT * FROM ts_token_type('default') ; tokid | alias | description -------+-----------------+------------------------------------------ 1 | asciiword | Word, all ASCII 2 | word | Word, all letters 3 | numword | Word, letters and digits 4 | email | Email address ... (23 rows)
参考资料
- PostgreSQL 文档: 文本搜索调试函数
- PostgreSQL 文档: Parser Testing