Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aQjrx-0001bI-0E for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Feb 2016 22:56:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aQjrv-0003b3-Te for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Feb 2016 22:56:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aQjrJ-0002ti-C0 for pgsql-bugs@postgresql.org; Tue, 02 Feb 2016 22:55:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aQjrH-00031R-5F for pgsql-bugs@postgresql.org; Tue, 02 Feb 2016 22:55:40 +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 u12MtSH7022459; Tue, 2 Feb 2016 17:55:29 -0500 From: Tom Lane To: dmitry-ryabov@mail.ru cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13906: improper hstore_to_json_loose functioning In-reply-to: <20160202125924.2782.1309@wrigleys.postgresql.org> References: <20160202125924.2782.1309@wrigleys.postgresql.org> Comments: In-reply-to dmitry-ryabov@mail.ru message dated "Tue, 02 Feb 2016 12:59:24 +0000" Date: Tue, 02 Feb 2016 17:55:28 -0500 Message-ID: <22458.1454453728@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) 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 dmitry-ryabov@mail.ru writes: > select hstore_to_json_loose(hstore('abc', '2016-01-01')) > any date/time/timestamp interpreted as the number Yeah, that's broken all right. Looking more closely, the combination of IsValidJsonNumber and json_lex_number will fail to notice trailing junk that is not part of a number unless that junk is (or at least begins with) an alphanumeric. The "-" here breaks that. Will fix, thanks for the report! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs