pgsql: Use JsonbIteratorToken consistently in automatic variable declar

Started by Noah Mischover 10 years ago3 messagescomitters
Jump to latest
#1Noah Misch
noah@leadboat.com

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(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noah Misch (#1)
Re: pgsql: Use JsonbIteratorToken consistently in automatic variable declar

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

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#3Noah Misch
noah@leadboat.com
In reply to: Tom Lane (#2)
Re: pgsql: Use JsonbIteratorToken consistently in automatic variable declar

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.

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers