pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Forbid numeric NaN in jsonpath
3+ messages / 1 participants
[nested] [flat]

* pgsql: Forbid numeric NaN in jsonpath
@ 2020-07-11 00:25 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alexander Korotkov @ 2020-07-11 00:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/df646509f371069c65f84309eb5749642e8650b3

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c           |  8 --------
src/backend/utils/adt/jsonpath_exec.c        | 15 ++++++++-------
src/test/regress/expected/jsonb_jsonpath.out | 12 ++----------
3 files changed, 10 insertions(+), 25 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Forbid numeric NaN in jsonpath
@ 2020-07-11 00:25 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alexander Korotkov @ 2020-07-11 00:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/89a0b1a7ca0af36818ed7076c12ac00bcf4f007d

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c           |  8 --------
src/backend/utils/adt/jsonpath_exec.c        | 15 ++++++++-------
src/test/regress/expected/jsonb_jsonpath.out | 12 ++----------
3 files changed, 10 insertions(+), 25 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Forbid numeric NaN in jsonpath
@ 2020-07-11 00:25 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alexander Korotkov @ 2020-07-11 00:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f4ae676e3178124c2bc2b3a3530efe8f3cdbc442

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c           |  8 --------
src/backend/utils/adt/jsonpath_exec.c        | 15 ++++++++-------
src/test/regress/expected/jsonb_jsonpath.out | 12 ++----------
3 files changed, 10 insertions(+), 25 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-07-11 00:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11 00:25 pgsql: Forbid numeric NaN in jsonpath Alexander Korotkov <akorotkov@postgresql.org>
2020-07-11 00:25 pgsql: Forbid numeric NaN in jsonpath Alexander Korotkov <akorotkov@postgresql.org>
2020-07-11 00:25 pgsql: Forbid numeric NaN in jsonpath Alexander Korotkov <akorotkov@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox