• Andrew Dunstan's avatar
    Fix two-argument jsonb_object when called with empty arrays · 94c745eb
    Andrew Dunstan authored
    Some over-eager copy-and-pasting on my part resulted in a nonsense
    result being returned in this case. I have adopted the same pattern for
    handling this case as is used in the one argument form of the function,
    i.e. we just skip over the code that adds values to the object.
    
    Diagnosis and patch from Michael Paquier, although not quite his
    solution.
    
    Fixes bug #13936.
    
    Backpatch to 9.5 where jsonb_object was introduced.
    94c745eb
json.out 40.1 KB