• Tom Lane's avatar
    Fix to_timestamp/to_date's handling of consecutive spaces in format string. · 9a8f5729
    Tom Lane authored
    When there are consecutive spaces (or other non-format-code characters) in
    the format, we should advance over exactly that many characters of input.
    The previous coding mistakenly did a "skip whitespace" action between such
    characters, possibly allowing more input to be skipped than the user
    intended.  We only need to skip whitespace just before an actual field.
    
    This is really a bug fix, but given the minimal number of field complaints
    and the risk of breaking applications coded to expect the old behavior,
    let's not back-patch it.
    
    Jeevan Chalke
    9a8f5729
formatting.c 128 KB