Forbid numeric NaN in jsonpath

Alexander Korotkov <akorotkov@postgresql.org>

Commit: 89a0b1a7ca0af36818ed7076c12ac00bcf4f007d
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2020-07-11T00:21:48Z
Releases: 13.0
Forbid numeric NaN in jsonpath

SQL standard doesn't define numeric Inf or NaN values.  It appears even more
ridiculous to support then in jsonpath assuming JSON doesn't support these
values as well.  This commit forbids returning NaN from .double(), which was
previously allowed.  NaN can't be result of inner-jsonpath computation over
non-NaNs.  So, we can not expect NaN in the jsonpath output.

Reported-by: Tom Lane
Discussion: https://postgr.es/m/203949.1591879542%40sss.pgh.pa.us
Author: Alexander Korotkov
Reviewed-by: Tom Lane
Backpatch-through: 12

Files

Discussion