我有一個 tsvector,里面有字串(文本)的值。我想為 tsvector 中的每個元素執行 postgres 的 split_part() 函式,并獲得一個包含這些值的表。可能嗎?
例子:
tsvector:“你好”“世界”“謝謝”
對每個元素執行 split_part(elementOfTsvector, 'o', 1) 后的輸出:
桌子:
'地獄'
'w'
'謝謝你'
uj5u.com熱心網友回復:
您可以unnest()在 tsvectors 上使用來獲取詞位。
select split_part(lexeme, 'o', 1) from unnest('hello world ''thank you'''::tsvector);
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/504849.html
標籤:PostgreSQL 分裂 向量
上一篇:查找隨時間的價格變化
下一篇:聚合和分組的子查詢
