小编Max*_*mov的帖子

取消引用 JSON 字符串;打印不带引号的 JSON 字符串

SELECT json_array_elements('["one", "two"]'::json)
Run Code Online (Sandbox Code Playgroud)

给出结果

| json_array_elements |
| :------------------ |
| “一个” |
| “两个” |

我想要相同但没有引号:

one
two
Run Code Online (Sandbox Code Playgroud)

看起来我不能->>在这里使用,因为我在 JSON 中没有字段名称。它只是一个字符串数组。

Postgres 版本:PostgreSQL 10.0 on x86_64-apple-darwin,由 i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (基于 Apple Inc. build 5658) (LLVM build 2336.11.00) 编译,64-少量

postgresql json string-representation postgresql-10

16
推荐指数
3
解决办法
2万
查看次数