Re: jsonpath versus NaN
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Oleg Bartunov <obartunov@postgrespro.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Alexander Korotkov <a.korotkov@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-06-18T16:24:31Z
Lists: pgsql-hackers
On Thu, Jun 18, 2020 at 11:51 AM Oleg Bartunov <obartunov@postgrespro.ru> wrote: > The problem is that we tried to find a trade-off between standard and postgres > implementation, for example, in postgres CAST allows NaN and Inf, and SQL Standard > requires .double should works as CAST. It seems like the right thing is to implement the standard, not to implement whatever PostgreSQL happens to do in other cases. I can't help feeling like re-using the numeric data type for other things has led to this confusion. I think that fails in other cases, too: like what if you have a super-long integer that can't be represented as a numeric? I bet jsonb will fail, or maybe it will convert it to a string, but I don't see how it can do anything else. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Forbid numeric NaN in jsonpath
- f4ae676e3178 12.4 landed
- 89a0b1a7ca0a 13.0 landed
- df646509f371 14.0 landed
-
Improve error reporting for jsonpath .double() method
- 3ec5f6b53dfb 12.4 landed
- b9a04a9bc665 13.0 landed
- 065718116746 14.0 landed
-
Partial implementation of SQL/JSON path language
- 72b6460336e8 12.0 cited