Wrong dead return value in jsonb_utils.c
Rikard Falkeborn <rikard.falkeborn@gmail.com>
From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2019-05-12T01:18:08Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-dead-code-return-value-in-jsonb_util.patch (text/x-patch) patch 0001
Returning -1 from a function with bool as return value is the same as returning true. Now, the code is dead (since elog(ERROR, ...) does not return) so it doesn't matter to the compiler, but changing to false is less confusing for the programmer. Appologies if this is seen as unnecessary churn. The same code is present since 9.4, but perhaps it's not really worth backporting since it is more of an aesthetic change?
Commits
-
Fix incorrect return value in JSON equality function for scalars
- 1171dbde2dae 12.0 landed