Json值可以包含字符串值.例如.:
postgres=# SELECT to_json('Some "text"'::TEXT);
to_json
-----------------
"Some \"text\""
Run Code Online (Sandbox Code Playgroud)
如何将该字符串提取为postgres文本值?
::TEXT不起作用.它返回引用的json,而不是原始字符串:
postgres=# SELECT to_json('Some "text"'::TEXT)::TEXT;
to_json
-----------------
"Some \"text\""
Run Code Online (Sandbox Code Playgroud)
谢谢.
PS我正在使用PostgreSQL 9.3