json_to_recordset not working with camelcase json keys

From: Daniel Kellenberger <Daniel(dot)Kellenberger(at)netcetera(dot)com>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: json_to_recordset not working with camelcase json keys
Date: 2015-12-15 21:46:33
Message-ID: 9e4b92c2c68d4c3b8c4cdf5aa11bc844@exchange01.one.nca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi all,

We tried to extract from a json with camel case keys values, but unfortunatelly they are not mapped.

Testcase: (PostgreSQL 9.4.5)

select * from json_to_recordset('[{"aB":1,"bC":"foo"},{"aB":"2","cD":"bar"}]') as x(aB int, bC text);

Expected:
aB | bC
1 | foo
2 | null

Actual:
aB | bC
null | null
null | null

Does anyone knows if this is a bug?
Thanks for any help.

Kind regards,
Daniel

--
Our software sets the course: http://nca.me/software

Daniel Kellenberger | daniel(dot)kellenberger(at)netcetera(dot)com | T +41 44 297 58 14 |
Netcetera AG | 8040 Z?rich | Switzerland | http://netcetera.com |

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-12-15 22:16:55 Re: BUG #13818: PostgreSQL crashes after cronjob runs as "postgres"
Previous Message Peter Eisentraut 2015-12-15 20:21:22 Re: pg_rewind exiting with error code 1 when source and target are on the same timeline