I need to parse JSON objects in PL/PgSQL function and transform them in arrays, or rowsets, or whatever iterable. Is there some sort of function or plugin to do this?
Google search is clogged with JSON serialization coming in Postgresql 9.2.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll probably want to use a procedural language add-on at this point, like PL/Perl, PL/Python or PL/V8 using the language of your choice’s JSON support to produce the required data.
You could probably write a C extension library to add the desired functionality, but it’s unlikely to be worth the effort when it’s already possible via the PLs.
I’m hoping to see (and help to add) richer JSON manipulation functions in 9.3.