Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5XRS-0008Na-Ly for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Apr 2018 14:06:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5XRR-000839-Jt for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Apr 2018 14:06:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5XPZ-0000fz-21 for pgsql-hackers@lists.postgresql.org; Mon, 09 Apr 2018 14:04:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5XPV-0005JT-Dc for pgsql-hackers@lists.postgresql.org; Mon, 09 Apr 2018 14:04:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w39E4QIw011285; Mon, 9 Apr 2018 10:04:26 -0400 From: Tom Lane To: ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) cc: Peter Eisentraut , Pavel Stehule , Nikita Glukhov , PostgreSQL Hackers Subject: Re: Transform for pl/perl In-reply-to: References: <20171127132439.23dc26ef@anthony-24-g082ur> <20171201184921.27he6vbp62yegpvm@alvherre.pgsql> <20171207125455.39067aa7@anthony-24-g082ur> <20171207125602.5326f103@anthony-24-g082ur> <20180112114739.6a9f0d4c@anthony-24-g082ur> <20180131103621.GA19345@zakirov.localdomain> <20180215125313.290468ae@anthony-24-g082ur> <20180312110821.29c80420@anthony-24-g082ur> <505345c5-0159-077d-f64e-60afb01e5fbe@postgrespro.ru> <26a0840a-6b09-44fc-9e4e-8200c1887882@2ndquadrant.com> Comments: In-reply-to ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) message dated "Mon, 09 Apr 2018 14:00:55 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11283.1523282666.1@sss.pgh.pa.us> Date: Mon, 09 Apr 2018 10:04:26 -0400 Message-ID: <11284.1523282666@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > I tried fixing this by adding an 'if (SvUV(in))' clause to > SV_to_JsonbValue, but I couldn't find a function to create a numeric > value from an uint64. If it's not possible, should we error on UVs > greater than PG_INT64_MAX? I think you'd have to convert to text and back. That's kind of icky, but it beats failing. Or we could add a not-visible-to-SQL uint8-to-numeric function in numeric.c. Not sure if this is enough use-case to justify that though. regards, tom lane