Re: BUG #13906: improper hstore_to_json_loose functioning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dmitry-ryabov(at)mail(dot)ru
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13906: improper hstore_to_json_loose functioning
Date: 2016-02-02 22:55:28
Message-ID: 22458.1454453728@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

dmitry-ryabov(at)mail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2016-02-02 23:27:44 Re: BUG #13908: Query returns too few rows
Previous Message Tom Lane 2016-02-02 22:52:16 Re: BUG #13908: Query returns too few rows