Re: patch: Use pg_mbcliplen for truncation in text-to-name conversion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch: Use pg_mbcliplen for truncation in text-to-name conversion
Date
Msg-id 138.1337978861@sss.pgh.pa.us
Whole thread Raw
In response to patch: Use pg_mbcliplen for truncation in text-to-name conversion  (Karl Schnaitter <karlsch@gmail.com>)
List pgsql-hackers
Karl Schnaitter <karlsch@gmail.com> writes:
> 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.

Good catch, but poking around I note that bpchar_name has the same
disease.  Will fix, thanks for the report!
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Bug in new buffering GiST build code
Next
From: Kohei KaiGai
Date:
Subject: Re: [RFC] Interface of Row Level Security