Re: patch (for 9.1) string functions
Itagaki Takahiro <itagaki.takahiro@gmail.com>
From: Itagaki Takahiro <itagaki.takahiro@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>, Merlin Moncure <mmoncure@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Erik Rijkers <er@xs4all.nl>
Date: 2010-07-21T03:27:00Z
Lists: pgsql-hackers
Attachments
- stringfunc_core-20100721.diff (application/octet-stream) patch
I reviewed the core changes of the patch. I don't think we need mb_string_info() at all. Instead, we can just call pg_mbxxx() functions. I rewrote the patch to use pg_mbstrlen_with_len() and pg_mbcharcliplen(). What do you think the changes? It requires re-counting lengths of multi-byte strings in some cases, but the code will be much simpler and can avoid allocating length buffers. I'd like to apply contrib/stringinfo apart from the core changes, because there seems to be still some idea to improve sprintf(). -- Itagaki Takahiro