Re: patch: Use pg_mbcliplen for truncation in text-to-name conversion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karl Schnaitter <karlsch(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch: Use pg_mbcliplen for truncation in text-to-name conversion
Date: 2012-05-25 20:47:41
Message-ID: 138.1337978861@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Karl Schnaitter <karlsch(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2012-05-25 21:08:57 Re: [RFC] Interface of Row Level Security
Previous Message Heikki Linnakangas 2012-05-25 20:33:12 Re: Bug in new buffering GiST build code