On 08/24/2013 09:08 PM, Daniel Farina wrote:
On Sat, Aug 24, 2013 at 6:04 PM, Daniel Farina <dan...@fdr.io> wrote:
But there's no good way I can find from the documentation to do it
with a scalar: select ('"va\"lue"'::json)::text;
Triggered send by accident:

select ('"va\"lue"'::json)::text;
    text
-----------
  "va\"lue"
(1 row)

the JSON escaping is retained.  That may be reasonable for a
text-cast, so I'm not suggesting its reinterpretation, but there is no
operator I can identify immediately from the documentation to convert
a JSON string value into a Postgres one like json_each_text, except on
a json that contains a scalar JSON string.




This came up recently on -bugs. See <http://www.postgresql.org/message-id/51fbf787.5000...@dunslane.net>, where I suggested we expose the dequoting function.

cheers

andrew


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to