Re: jsonpath versus NaN
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oleg Bartunov <obartunov@postgrespro.ru>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-06-18T16:07:44Z
Lists: pgsql-hackers
Oleg Bartunov <obartunov@postgrespro.ru> writes: > 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. As I said, I think this is a fundamental misreading of the standard. The way I read it is that it requires the set of values that are legal according to the standard to be processed the same way as CAST would. While we certainly *could* choose to extend jsonpath, and/or jsonb itself, to allow NaN/Inf, I do not think that it's sane to argue that the standard requires us to do that; the wording in the opposite direction is pretty clear. Also, I do not find it convincing to extend jsonpath that way when we haven't extended jsonb. Quite aside from the ensuing code warts, what in the world is the use-case? regards, tom lane
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