Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    820bdccc
    Remove a useless PG_GETARG_DATUM() call from jsonb_build_array. · 820bdccc
    Tom Lane authored
    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.
    820bdccc
    History
    Remove a useless PG_GETARG_DATUM() call from jsonb_build_array.
    Tom Lane authored
    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.