zn(at)dbml(dot)dk writes:
> Try the following:
> select * from json_to_record('{"aA":1,"bB":[1,2,3],"c":"bar"}') as x(aA int,
> bB text, c text)
> first two columns will be empty.
You need to do it like this:
select * from json_to_record('{"aA":1,"bB":[1,2,3],"c":"bar"}') as x("aA" int,
"bB" text, c text);
aA | bB | c
----+---------+-----
1 | [1,2,3] | bar
(1 row)
Without the quotes, the SQL names aA etc are case-folded to aa etc.
regards, tom lane