pgsql: Remove our dependencies on MB_CUR_MAX in favor of believing that

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove our dependencies on MB_CUR_MAX in favor of believing that
Date: 2008-12-15 14:55:51
Message-ID: 20081215145551.0CEC47563FE@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
formatting.c (r1.151 -> r1.152)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/formatting.c?r1=1.151&r2=1.152)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-12-15 15:06:31 pgsql: Reduce the scaling factor for attstattarget to number-of-lexemes
Previous Message Magnus Hagander 2008-12-15 10:28:22 pgsql: Support specifying filename for SSL certificate, key, root