From: Bruce Momjian Date: Sat, 4 Jun 2005 20:56:13 +0000 (+0000) Subject: Add comment for multi-byte computation. X-Git-Tag: REL8_1_0BETA1~651 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=954108f92d5477a4527380c9f867bc9401880975;p=thirdparty%2Fpostgresql.git Add comment for multi-byte computation. --- diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 19d9306e4ec..6d5f21b52ef 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.182 2005/05/24 15:45:34 ishii Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.183 2005/06/04 20:56:13 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1556,6 +1556,7 @@ exprTypmod(Node *expr) { int32 len = VARSIZE(DatumGetPointer(con->constvalue)) - VARHDRSZ; + /* if multi-byte, take len and find # characters */ if (pg_database_encoding_max_length() > 1) len = pg_mbstrlen_with_len(VARDATA(DatumGetPointer(con->constvalue)), len); return len + VARHDRSZ;