Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XvCM0-0000ag-8k for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Nov 2014 21:48:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XvCLz-0003Xj-5F for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Nov 2014 21:48:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XvCLx-0003XZ-PG; Sun, 30 Nov 2014 21:48:25 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XvCLt-0004An-9Y; Sun, 30 Nov 2014 21:48:24 +0000 Received: from mfilter36-d.gandi.net (mfilter36-d.gandi.net [217.70.178.167]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id CAE1441C061; Sun, 30 Nov 2014 22:48:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter36-d.gandi.net Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter36-d.gandi.net (mfilter36-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 6W0EAE146GsN; Sun, 30 Nov 2014 22:48:17 +0100 (CET) X-Originating-IP: 98.27.58.255 Received: from [192.168.10.146] (cpe-098-027-058-255.nc.res.rr.com [98.27.58.255]) (Authenticated sender: adsend@dunslane.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 5677041C04B; Sun, 30 Nov 2014 22:48:16 +0100 (CET) Message-ID: <547B909E.4010801@dunslane.net> Date: Sun, 30 Nov 2014 16:48:14 -0500 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Tom Lane CC: bouda@edookit.com, pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [BUGS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON References: <20141126081059.15510.5034@wrigleys.postgresql.org> <15817.1417018789@sss.pgh.pa.us> <54760440.2080501@dunslane.net> <547B3FC4.8080509@dunslane.net> <9580.1417365900@sss.pgh.pa.us> <547B800F.60309@dunslane.net> <29018.1417383100@sss.pgh.pa.us> In-Reply-To: <29018.1417383100@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 11/30/2014 04:31 PM, Tom Lane wrote: > Andrew Dunstan writes: >> OK, here's the patch. > Can we make IsValidJsonNumber() take a "const char *"? Also its > comment should specify that it doesn't require nul-terminated > input, if indeed it doesn't. Otherwise +1. > > Then I have to cast away the const-ness when I assign it inside the function. Constifying the whole API would be a rather larger project, I suspect, assuming it's possible. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers