|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * 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 $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -1556,6 +1556,7 @@ exprTypmod(Node *expr) |
1556 | 1556 | { |
1557 | 1557 | int32len=VARSIZE(DatumGetPointer(con->constvalue))-VARHDRSZ; |
1558 | 1558 |
|
| 1559 | +/* if multi-byte, take len and find # characters */ |
1559 | 1560 | if (pg_database_encoding_max_length()>1) |
1560 | 1561 | len=pg_mbstrlen_with_len(VARDATA(DatumGetPointer(con->constvalue)),len); |
1561 | 1562 | returnlen+VARHDRSZ; |
|