Rename JsonIsPredicate.value_type, fix JSON backend/nodes/ infrastructure.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3ab9a63cb638a1fd99475668e2da9c237495aeda
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-05-13T15:40:08Z
Releases: 15.0
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

Discussion