我正在转向使用Postgres和text []作为关键字。我之前使用过csv字符串。结果,我的数据很难看,我有这样的例子。
{Tor," granite"," rock formations"," landscape"," people"," men"," 1920s"," 20th century"," climbing"}
是否有 easy 方法来修剪和清理数据,因此更像是这样。
{Tor,granite,rock formations,landscape,people,men,1920s,20th century,climbing}
答案 0 :(得分:0)
你可以这样做:
select replace( replace( yourField, '"', '' ), ', ', ',')
from yourTable
结果将是:
{Tor,granite,rock formations,landscape,people,men,1920s,20th century,climbing}