mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
Here are the patches against the current source tree. I have run the
regression test on a FreeBSD box with both non-MULTIBYTE and MULTIBYTE-enabled, and confirmed that the results are same. However I do not tested on PCs(I don't have access to win). Please let me know if the patches break anything on PCs. Also please note that the patch for varchar.c is a fix for a nasty bug of char(n) types that I introduced and I believe at least this should be applied. Tatsuo Ishii
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.41 1998/09/25 15:51:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.42 1998/10/06 03:02:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -163,7 +163,11 @@ bpchar(char *s, int32 len)
|
||||
#ifdef MULTIBYTE
|
||||
/* truncate multi-byte string in a way not to break
|
||||
multi-byte boundary */
|
||||
slen = pg_mbcliplen(VARDATA(s), rlen, rlen);
|
||||
if (VARSIZE(s) > len) {
|
||||
slen = pg_mbcliplen(VARDATA(s), VARSIZE(s)-VARHDRSZ, rlen);
|
||||
} else {
|
||||
slen = VARSIZE(s) - VARHDRSZ;
|
||||
}
|
||||
#else
|
||||
slen = VARSIZE(s) - VARHDRSZ;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user