From: | "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr> |
---|---|
To: | <pgsql-patches(at)postgresql(dot)org> |
Subject: | v7.4.1 text_position() patch |
Date: | 2004-01-30 14:32:37 |
Message-ID: | 000801c3e73d$e92fc870$cdcb56dc@paolo.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
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++)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-01-30 14:48:19 | Re: Question about indexes |
Previous Message | Bruce Momjian | 2004-01-30 13:00:19 | Re: 7.5 change documentation |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-01-30 15:31:52 | Re: v7.4.1 text_position() patch |
Previous Message | Neil Conway | 2004-01-29 22:43:59 | Re: support for printing/exporting xml |