From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rename JsonIsPredicate.value_type, fix JSON backend/nodes/ infra
Date: Fri, 13 May 2022 15:40:16 +0000
Message-ID: <E1npXOq-000XCO-Cv@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3ab9a63cb638a1fd99475668e2da9c237495aeda
Modified Files
--------------
src/backend/executor/execExprInterp.c | 12 ++++++------
src/backend/nodes/copyfuncs.c | 9 +++++----
src/backend/nodes/equalfuncs.c | 8 +++++---
src/backend/nodes/makefuncs.c | 4 ++--
src/backend/nodes/outfuncs.c | 16 +++++++++-------
src/backend/nodes/readfuncs.c | 16 +++++++++-------
src/backend/parser/parse_expr.c | 6 +++---
src/backend/utils/adt/ruleutils.c | 4 +++-
src/backend/utils/misc/queryjumble.c | 9 +++++----
src/include/catalog/catversion.h | 2 +-
src/include/nodes/makefuncs.h | 2 +-
src/include/nodes/primnodes.h | 6 +++---
12 files changed, 52 insertions(+), 42 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Rename JsonIsPredicate.value_type, fix JSON backend/nodes/ infra
In-Reply-To: <E1npXOq-000XCO-Cv@gemulon.postgresql.org>
References: <E1npXOq-000XCO-Cv@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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