Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 954108f

Browse files
committed
Add comment for multi-byte computation.
1 parent 72c53ac commit 954108f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/parser/parse_expr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.182 2005/05/24 15:45:34 ishii Exp $
11+
* $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.183 2005/06/04 20:56:13 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1556,6 +1556,7 @@ exprTypmod(Node *expr)
15561556
{
15571557
int32 len = VARSIZE(DatumGetPointer(con->constvalue)) - VARHDRSZ;
15581558

1559+
/* if multi-byte, take len and find # characters */
15591560
if (pg_database_encoding_max_length() > 1)
15601561
len = pg_mbstrlen_with_len(VARDATA(DatumGetPointer(con->constvalue)), len);
15611562
return len + VARHDRSZ;

0 commit comments

Comments
 (0)