On 12/15/2015 01:46 PM, Daniel Kellenberger wrote:
> We tried to extract from a json with camel case keys values, but
> unfortunatelly they are not mapped.
>=20
> Testcase: (PostgreSQL 9.4.5)
>=20
> select * from
> json_to_recordset('[{"aB":1,"bC":"foo"},{"aB":"2","cD":"bar"}]') as x(a=
B
> int, bC text);
Not a bug, I believe. You probably meant this:
select * from json_to_recordset('[{"aB":1,"bC":"foo"},
{"aB":"2","cD":"bar"}]')
as x("aB" int, "bC" text, "cD" text);
aB | bC | cD
----+-----+-----
1 | foo |
2 | | bar
(2 rows)
Unquoted identifiers are lowercased in postgres, so for camel case
identifiers you would need double quotes.
HTH,
Joe
--=20
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development