• T
    Add three-parameter forms of array_to_string and string_to_array, to allow · 33f43725
    Tom Lane 提交于
    better handling of NULL elements within the arrays.  The third parameter
    is a string that should be used to represent a NULL element, or should
    be translated into a NULL element, respectively.  If the third parameter
    is NULL it behaves the same as the two-parameter form.
    
    There are two incompatible changes in the behavior of the two-parameter form
    of string_to_array.  First, it will return an empty (zero-element) array
    rather than NULL when the input string is of zero length.  Second, if the
    field separator is NULL, the function splits the string into individual
    characters, rather than returning NULL as before.  These two changes make
    this form fully compatible with the behavior of the new three-parameter form.
    
    Pavel Stehule, reviewed by Brendan Jurd
    33f43725
varlena.c 82.5 KB