pgsql: Fix incorrect return value in JSON equality function for scalars

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pgsql: Fix incorrect return value in JSON equality function for scalars

Michael Paquier-2
Fix incorrect return value in JSON equality function for scalars

equalsJsonbScalarValue() uses a boolean as return type, however for one
code path -1 gets returned, which is confusing.  The origin of the
confusion is visibly that this code got copy-pasted from
compareJsonbScalarValue() since it has been introduced in d1d50bf.

No backpatch, as this is only cosmetic.

Author: Rikard Falkeborn
Discussion: https://postgr.es/m/CADRDgG7mJnek6HNW13f+LF6V=6gag9PM+P7H5dnyWZAv49aBGg@...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1171dbde2daef8f0dcd1dc1e54531a0d8dd34d88

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)