Thread: pgsql: Use JsonbIteratorToken consistently in automatic variable declar

pgsql: Use JsonbIteratorToken consistently in automatic variable declar

From
Noah Misch
Date:
Use JsonbIteratorToken consistently in automatic variable declarations.

Many functions stored JsonbIteratorToken values in variables of other
integer types.  Also, standardize order relative to other declarations.
Expect compilers to generate the same code before and after this change.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7732d49ca211571552bf82b5207deed95c0cc09c

Modified Files
--------------
src/backend/utils/adt/jsonb.c      |    5 +++--
src/backend/utils/adt/jsonb_gin.c  |   10 +++++-----
src/backend/utils/adt/jsonb_op.c   |    4 ++--
src/backend/utils/adt/jsonb_util.c |    6 +++---
src/backend/utils/adt/jsonfuncs.c  |   34 +++++++++++++++++-----------------
5 files changed, 30 insertions(+), 29 deletions(-)


Noah Misch <noah@leadboat.com> writes:
> Use JsonbIteratorToken consistently in automatic variable declarations.
> Many functions stored JsonbIteratorToken values in variables of other
> integer types.  Also, standardize order relative to other declarations.
> Expect compilers to generate the same code before and after this change.

FWIW, I think this sort of thing should get back-patched.  It's presumably
pretty low-risk, and if you don't do that, you've created a bunch of
points of failure for bug-fix back-patches.  In code as volatile as the
jsonb code has been, it's foolish not to try to keep the branches as much
in sync as we can.

            regards, tom lane


Re: pgsql: Use JsonbIteratorToken consistently in automatic variable declar

From
Noah Misch
Date:
On Mon, Oct 12, 2015 at 09:56:30AM -0400, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > Use JsonbIteratorToken consistently in automatic variable declarations.
> > Many functions stored JsonbIteratorToken values in variables of other
> > integer types.  Also, standardize order relative to other declarations.
> > Expect compilers to generate the same code before and after this change.
>
> FWIW, I think this sort of thing should get back-patched.

Works for me.  Done.