From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Remove a useless PG_GETARG_DATUM() call from jsonb_build_array. |
Date: | 2016-01-09 22:39:56 |
Message-ID: | E1aI2Au-0007xN-DG@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Remove a useless PG_GETARG_DATUM() call from jsonb_build_array.
This loop uselessly fetched the argument after the one it's currently
looking at. No real harm is done since we couldn't possibly fetch off
the end of memory, but it's confusing to the reader.
Also remove a duplicate (and therefore confusing) PG_ARGISNULL check in
jsonb_build_object.
I happened to notice these things while trolling for missed null-arg
checks earlier today. Back-patch to 9.5, not because there is any
real bug, but just because 9.5 and HEAD are still in sync in this
file and we might as well keep them so.
In passing, re-pgindent.
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/57da416933db2aee75485eff67b732063c978a48
Modified Files
--------------
src/backend/utils/adt/jsonb.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-01-09 23:10:00 | Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix |
Previous Message | Tom Lane | 2016-01-09 22:21:04 | pgsql: Add some checks on "char"-type columns to type_sanity and opr_sa |