• Tom Lane's avatar
    Remove our dependencies on MB_CUR_MAX in favor of believing that · b4d64a6d
    Tom Lane authored
    pg_database_encoding_max_length() predicts the maximum character length
    returned by wchar2char().  Per Hiroshi Inoue, MB_CUR_MAX isn't usable on
    Windows because we allow encoding = UTF8 when the locale says differently;
    and getting rid of it seems a good idea on general principles because it
    narrows our dependence on libc's locale API just a little bit more.
    
    Also install a check for overflow of the buffer size computation.
    b4d64a6d
formatting.c 113 KB