pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Remove a useless PG_GETARG_DATUM() call from jsonb_build_array. 2+ messages / 1 participants [nested] [flat]
* pgsql: Remove a useless PG_GETARG_DATUM() call from jsonb_build_array. @ 2016-01-09 22:39 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-01-09 22:39 UTC (permalink / raw) To: 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 ------ master Details ------- http://git.postgresql.org/pg/commitdiff/820bdccc1be22513e1aaa441d554992a5a2e314f Modified Files -------------- src/backend/utils/adt/jsonb.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Remove a useless PG_GETARG_DATUM() call from jsonb_build_array. @ 2016-01-09 22:39 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-01-09 22:39 UTC (permalink / raw) To: 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(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-01-09 22:39 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-01-09 22:39 pgsql: Remove a useless PG_GETARG_DATUM() call from jsonb_build_array. Tom Lane <tgl@sss.pgh.pa.us> 2016-01-09 22:39 pgsql: Remove a useless PG_GETARG_DATUM() call from jsonb_build_array. Tom Lane <tgl@sss.pgh.pa.us>
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