BUG #11021: How to extract text value from json scalar? - Mailing list pgsql-bugs

From kolmyk@hotmail.com
Subject BUG #11021: How to extract text value from json scalar?
Date
Msg-id 20140722110227.27769.66551@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #11021: How to extract text value from json scalar?  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11021
Logged by:          Alexey
Email address:      kolmyk@hotmail.com
PostgreSQL version: 9.3.4
Operating system:   Windows 8.0
Description:

I'm using json_each function for iterate keys and values in my function, but
string values contains quotes.
I can use json_each_text, but sometimes I need to json value.
Can I extract text value from json scalar?

Now I'm using this alternative script:
('[' || value ||']')::json->>0

Example:
select key, value, ('[' || value ||']')::json->>0 from
json_each('{"a":123,"b":"first"}');

pgsql-bugs by date:

Previous
From: "Burgess, Freddie"
Date:
Subject: Re: PostgreSQL 9.3.4 Query Problems
Next
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts