Re: BUG #16092: json[b]_to_recordset and json[b]_populate_record do not read properties with mixed-case names

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: "dweinhardt78+pgsql-bugs(at)gmail(dot)com" <dweinhardt78+pgsql-bugs(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16092: json[b]_to_recordset and json[b]_populate_record do not read properties with mixed-case names
Date: 2019-10-31 14:41:54
Message-ID: 12615741572532914@myt2-c3952fd46804.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello

Its correct. Identifier name definition should be quoted if you want use uppercase symbols:

SELECT x.* FROM jsonb_to_recordset('[{"aName": "foo"}]'::jsonb) AS x("aName" text);

aName
-------
foo

unquoted names are always folded to lower case and therefore do not match. Per lexical structure documentation: https://www.postgresql.org/docs/current/sql-syntax-lexical.html

regards, Sergei

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexey Ermakov 2019-11-01 09:15:33 Re: BUG #16016: deadlock with startup process, AccessExclusiveLock on pg_statistic's toast table
Previous Message Tomas Vondra 2019-10-31 14:41:19 Re: a error happends when create a table in postgresql10.ubuntu 18.04