patch: Use pg_mbcliplen for truncation in text-to-name conversion
Karl Schnaitter <karlsch@gmail.com>
From: Karl Schnaitter <karlsch@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2012-05-25T06:56:01Z
Lists: pgsql-hackers
Attachments
- text_to_name.patch (text/plain) patch
The text_name function was truncating its input string to the first NAMEDATALEN-1 bytes, which is wrong if the string has multi-byte characters. This patch changes it to use pg_mbcliplen, following the namein function.