In src/backend/utils/adt/varlena.c,
766 line must be exits in block of 'else if (elm >1)' too.

Because, strpos() function make a wrong result in multibyte string. 
line 796
------------
                ps1 = p1 = (pg_wchar *) palloc((len1 + 1) * sizeof(pg_wchar));
                (void) pg_mb2wchar_with_len((unsigned char *) VARDATA(t1), p1, len1);
                len1 = pg_wchar_strlen(p1);
                ps2 = p2 = (pg_wchar *) palloc((len2 + 1) * sizeof(pg_wchar));
                (void) pg_mb2wchar_with_len((unsigned char *) VARDATA(t2), p2, len2);
                len2 = pg_wchar_strlen(p2);

                /*** recalculate px ****/
                px = (len1 - len2);

                for (p = 0; p <= px; p++)


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to