]> granicus.if.org Git - postgresql/commit
Remove our dependencies on MB_CUR_MAX in favor of believing that
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Dec 2008 14:55:50 +0000 (14:55 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Dec 2008 14:55:50 +0000 (14:55 +0000)
commitb4d64a6d489773e2f48838473ee8541249ee7dc2
tree146a5b8cb335e0f4adadaecbf5d1b46497b212ef
parent5f3724dd7c6b8beb9be3030cb3262038755c88e4
Remove our dependencies on MB_CUR_MAX in favor of believing that
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.
src/backend/utils/adt/formatting.c