ts_token_type()

返回解析器识别的 token 类型的函数

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() 主要用于允许直接测试全文搜索解析器。

变更历史

示例

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)

分类

全文搜索, 系统函数, 测试

另请参阅

ts_parse(), ts_lexize(), ts_debug()

反馈

提交任何关于“ts_token_type()”的评论、建议或更正请 在此处进行。