Re: BUG #13972: jsonb_to_record cant map camelcase keys

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #13972: jsonb_to_record cant map camelcase keys
Дата
Msg-id CAKFQuwZdSZH-moMo-++nSZxcOBcx08h68zoHKSZt6tAULkj0WQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #13972: jsonb_to_record cant map camelcase keys  (zn@dbml.dk)
Список pgsql-bugs
On Thu, Feb 18, 2016 at 6:12 AM, <zn@dbml.dk> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      13972
> Logged by:          Jacob Zneider
> Email address:      zn@dbml.dk
> PostgreSQL version: 9.4.5
> Operating system:   OS x 10.11.3
> Description:
>
> 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.
>
> select * from json_to_record('{"aa":1,"bb":[1,2,3],"c":"bar"}') as x(aA
> int,
> bB text, c text)
>
> All columns are mapped.
>
> select * from json_to_record('{"aa":1,"bb":[1,2,3],"c":"bar"}') as x(aa
> int,
> bb text, c text)
>
>
=E2=80=8B
Working as intended.
=E2=80=8B


=E2=80=8BUnquoted identifiers in SQL are folded to lower case.  There is no
difference between the "as x(...)" in your example.  They all result in
(aa, bb, c)=E2=80=8B.  The fact that json_to_record attempts to match in a
case-sensitive manner is intentional.

David J.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #13973: Constants resolved in then/else clauses
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13973: Constants resolved in then/else clauses