Re: multibyte charater set in levenshtein function

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-05-12T20:13:58Z
Lists: pgsql-hackers

Attachments

On Wed, May 12, 2010 at 11:04 PM, Alvaro Herrera <alvherre@alvh.no-ip.org>wrote:

> On a quick look, I didn't like the way you separated the
> "pg_database_encoding_max_length() > 1" cases.  There seem to be too
> much common code.  Can that be refactored a bit better?
>
I did a little refactoring in order to avoid some similar code.
I'm not quite sure about my CHAR_CMP macro. Is it a good idea?