From: Daniel Kellenberger <Daniel.Kellenberger@netcetera.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: json_to_recordset not working with camelcase json keys
Date: Tue, 15 Dec 2015 21:46:33 +0000
Message-ID: <9e4b92c2c68d4c3b8c4cdf5aa11bc844@exchange01.one.nca> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.kellenberger@netcetera.com | T +41 44 297 58 14 |
Netcetera AG | 8040 Z?rich | Switzerland | http://netcetera.com |
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: Daniel.Kellenberger@netcetera.com
Subject: Re: json_to_recordset not working with camelcase json keys
In-Reply-To: <9e4b92c2c68d4c3b8c4cdf5aa11bc844@exchange01.one.nca>
References: <9e4b92c2c68d4c3b8c4cdf5aa11bc844@exchange01.one.nca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox