【发布时间】:2018-06-15 22:23:41
【问题描述】:
我有这个数组:
ARRAY['this', 'is', 'my', 'string']
我想把它转换成这样的字符串:
'this', 'is', 'my', 'string'
我试过了:
array_to_string(ARRAY['this', 'is', 'my', 'string'], ',')
但我得到的不是所需的输出:
this, is, my, string
【问题讨论】:
-
我不建议对 CSV 格式使用单引号字符。使用双引号或不使用。 tools.ietf.org/html/rfc4180
标签: arrays string postgresql csv