projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
582f1d1
)
Add comment for multi-byte computation.
author
Bruce Momjian
<bruce@momjian.us>
Sat, 4 Jun 2005 20:56:13 +0000
(20:56 +0000)
committer
Bruce Momjian
<bruce@momjian.us>
Sat, 4 Jun 2005 20:56:13 +0000
(20:56 +0000)
src/backend/parser/parse_expr.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/parser/parse_expr.c
b/src/backend/parser/parse_expr.c
index 1aaf1cf3943159ea98b7f809d7c53c30d07d1f6b..5f2acfa1357ff5e012f01e2392ff07604b37d4ab 100644
(file)
--- a/
src/backend/parser/parse_expr.c
+++ b/
src/backend/parser/parse_expr.c
@@
-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;