Add comment for multi-byte computation.
authorBruce Momjian <bruce@momjian.us>
Sat, 4 Jun 2005 20:56:13 +0000 (20:56 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 4 Jun 2005 20:56:13 +0000 (20:56 +0000)
src/backend/parser/parse_expr.c

index 1aaf1cf3943159ea98b7f809d7c53c30d07d1f6b..5f2acfa1357ff5e012f01e2392ff07604b37d4ab 100644 (file)
@@ -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;