Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VFBNV-0005Du-AH for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Aug 2013 23:11:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VFBNU-0006Xy-PQ for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Aug 2013 23:11:48 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VFBNT-0006WJ-6F for pgsql-bugs@postgresql.org; Thu, 29 Aug 2013 23:11:47 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VFBNM-00008r-9c for pgsql-bugs@postgresql.org; Thu, 29 Aug 2013 23:11:46 +0000 Received: from anarazel.de (p54AF4179.dip0.t-ipconnect.de [84.175.65.121]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MF4EF-1VGaHI23Lf-00GG5i; Fri, 30 Aug 2013 01:11:39 +0200 Received: by anarazel.de (Postfix, from userid 1000) id DC90A101741; Fri, 30 Aug 2013 01:11:38 +0200 (CEST) Date: Fri, 30 Aug 2013 01:11:38 +0200 From: Andres Freund To: george.stragand@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8407: json_populate_record case sensitivity Message-ID: <20130829231138.GG4283@awork2.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable X-Provags-ID: V02:K0:Td15dtnus5YrXh9HIR/OubbNl9G9lLHyIn/ePL1xTcU L7qYwdj16yKieMHsjGBlmUwKazRSn7h9m45C+02GcL+7Uz6lOy pD7BAyLPQjFDdwOJ0kmmIbGGy0bK4YbWpFxyaTBQyqY0E3+egU FH3zUCo+86mfgqM8H1JzVhR1396alattRoI8mrXmvK+7dpEwFn xZH3CPabDKd7ch1FKICe0h677Y2j/z0EhTesXHC7w7IPi3gjsL Dzs96zf04fTpkB3zMSe2hMSpTHVaul4aWUN/cQ7VOgX3k8EZtE K/KfyWAZYZmJXm1ZjMbwrO05elwT+kiPNNpP0UzcVFM/3Yx4/4 SAGet+nnLeS05AIdTUdSzCbAcIbyqtPNw0QdaxYTZ X-Pg-Spam-Score: -1.9 (-) 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 On 2013-08-29 21:08:56 +0000, george.stragand@gmail.com wrote: > The following bug has been logged on the website: >=20 > Bug reference: 8407 > Logged by: Possible bug with json_populate_record? > Email address: george.stragand@gmail.com > PostgreSQL version: 9.3rc1 > Operating system: Ubuntu > Description:=20=20=20=20=20=20=20=20 >=20 > Using PostgreSQL 9.3beta2. >=20 >=20 > SELECT version(); >=20 >=20 > PostgreSQL 9.3beta2 on x86_64-unknown-linux-gnu, compiled by gcc > (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit >=20 >=20 > The question is regarding json keys in uppercase. Here's a small example: >=20 >=20 > create type testPop as ( > foobar int > ); >=20 >=20 > This returns as expected: >=20 >=20 > select * from json_populate_record(null::testPop, '{"foobar": 1}'); >=20 >=20 > Whereas this form, upper-cased version of foobar, returns an empty record. >=20 >=20 > select * from json_populate_record(null::testPop, '{"FOOBAR": 1}'); >=20 >=20 > That could be working as designed, as 'foobar' !=3D 'FOOBAR', and is > completely acceptable.=20 >=20 >=20 > So, drop the type and recreate it with these statements: >=20 >=20 > drop type testPop; >=20 >=20 > create type testPop as ( > FOOBAR int > ); Postgresql lowercases unquoted identifiers. Make that =BB"FOOBAR" int=AB and it should work. Greetings, Andres Freund --=20 Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs