On 08/24/2013 09:08 PM, Daniel Farina wrote:
On Sat, Aug 24, 2013 at 6:04 PM, Daniel Farina <[email protected]> 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/[email protected]>, where I suggested we expose the dequoting function.
cheers andrew -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
