Rename JsonIsPredicate.value_type, fix JSON backend/nodes/ infrastructure.
Tom Lane <tgl@sss.pgh.pa.us>
Rename JsonIsPredicate.value_type, fix JSON backend/nodes/ infrastructure. I started out with the intention to rename value_type to item_type to avoid a collision with a typedef name that appears on some platforms. Along the way, I noticed that the adjacent field "format" was not being correctly handled by the backend/nodes/ infrastructure functions: copyfuncs.c erroneously treated it as a scalar, while equalfuncs, outfuncs, and readfuncs omitted handling it at all. This looks like it might be cosmetic at the moment because the field is always NULL after parse analysis; but that's likely a bug in itself, and the code's certainly not very future-proof. Let's fix it while we can still do so without forcing an initdb on beta testers. Further study found a few other inconsistencies in the backend/nodes/ infrastructure for the recently-added JSON node types, so fix those too. catversion bumped because of potential change in stored rules. Discussion: https://postgr.es/m/526703.1652385613@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execExprInterp.c | modified | +6 −6 |
| src/backend/nodes/copyfuncs.c | modified | +5 −4 |
| src/backend/nodes/equalfuncs.c | modified | +5 −3 |
| src/backend/nodes/makefuncs.c | modified | +2 −2 |
| src/backend/nodes/outfuncs.c | modified | +9 −7 |
| src/backend/nodes/readfuncs.c | modified | +9 −7 |
| src/backend/parser/parse_expr.c | modified | +3 −3 |
| src/backend/utils/adt/ruleutils.c | modified | +3 −1 |
| src/backend/utils/misc/queryjumble.c | modified | +5 −4 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/nodes/makefuncs.h | modified | +1 −1 |
| src/include/nodes/primnodes.h | modified | +3 −3 |
Discussion
- typedefs.list glitches 4 messages · 2022-05-12 → 2023-12-12