Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a8ykc-0002Ol-EH for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Dec 2015 23:11:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a8ykc-0001gt-0B for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Dec 2015 23:11:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a8xUC-0000Tt-1f for pgsql-bugs@postgresql.org; Tue, 15 Dec 2015 21:50:20 +0000 Received: from mail.netcetera.ch ([194.126.145.7] helo=mail.netcetera.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a8xU4-0002lF-Ft for pgsql-bugs@postgresql.org; Tue, 15 Dec 2015 21:50:18 +0000 Received: from netcetera.com (smtp-int.netcetera.com [172.16.0.139]) by mail.netcetera.com (8.13.8/8.14.1) with ESMTP id tBFLkxVQ013767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 15 Dec 2015 22:47:00 +0100 Received: from exchange01.one.nca (exchange01.one.nca [172.16.1.20]) by netcetera.com (8.13.8/8.14.1) with ESMTP id tBFLkxeb011550 for ; Tue, 15 Dec 2015 22:46:59 +0100 Received: from EXCHANGE01.one.nca (172.16.1.20) by exchange01.one.nca (172.16.1.20) with Microsoft SMTP Server (TLS) id 15.0.712.24; Tue, 15 Dec 2015 22:46:34 +0100 Received: from EXCHANGE01.one.nca ([fe80::b167:9768:7217:8762]) by exchange01.one.nca ([fe80::b167:9768:7217:8762%12]) with mapi id 15.00.0712.012; Tue, 15 Dec 2015 22:46:34 +0100 From: Daniel Kellenberger To: "pgsql-bugs@postgresql.org" Subject: json_to_recordset not working with camelcase json keys Thread-Topic: json_to_recordset not working with camelcase json keys Thread-Index: AQHRN4FAqJx2dV22Mkq8Ba2HedY50g== Date: Tue, 15 Dec 2015 21:46:33 +0000 Message-ID: <9e4b92c2c68d4c3b8c4cdf5aa11bc844@exchange01.one.nca> Accept-Language: de-DE, en-US, de-CH Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.29] Content-Type: multipart/alternative; boundary="_000_9e4b92c2c68d4c3b8c4cdf5aa11bc844exchange01onenca_" MIME-Version: 1.0 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --_000_9e4b92c2c68d4c3b8c4cdf5aa11bc844exchange01onenca_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, We tried to extract from a json with camel case keys values, but unfortunat= elly 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 1= 4 | Netcetera AG | 8040 Z?rich | Switzerland | http://netcetera.com | --_000_9e4b92c2c68d4c3b8c4cdf5aa11bc844exchange01onenca_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi all,

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

Testcase: (PostgreSQL 9.4.5)
select * from json_t=
o_recordset('[{"aB":1,"bC":"foo"},{"=
;aB":"2","cD":"bar"}]') as x(aB int, bC text);<=
/pre>

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 |
--_000_9e4b92c2c68d4c3b8c4cdf5aa11bc844exchange01onenca_--