Re: v7.4.1 text_position() patch

From: "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr>
To: <pgsql-patches(at)postgresql(dot)org>
Cc: <t-ishii(at)sra(dot)co(dot)jp>
Subject: Re: v7.4.1 text_position() patch
Date: 2004-01-30 16:25:32
Message-ID: 000901c3e74d$aee9c5c0$cdcb56dc@paolo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

strpos() function ( internal text_postion()) had a bug in unicode database.

dsn=> select id,subject, strpos(subject, ' ') from bd_22 where id = 3927;
id | subject | strpos
------+-------------+--------
3927 | 안녕하세요~ | 0
(1 row)

Time: 1.619 ms
dsn=> select id,subject, strpos(subject, ' ') from bd_22 where id between 3925 and 3927;
id | subject | strpos
------+-----------------------------------------+--------
3925 | 대구에 DB 스터디 관련한...곳..없는가요? | 4
3927 | 안녕하세요~ | 11
(2 rows)

Time: 2.490 ms
----
Sorry, above text is korean language.
strpos returns wrong result.

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr>
Cc: <pgsql-patches(at)postgresql(dot)org>; "Tatsuo Ishii" <t-ishii(at)sra(dot)co(dot)jp>
Sent: Saturday, January 31, 2004 12:31 AM
Subject: Re: [PATCHES] v7.4.1 text_position() patch

> Hm. I don't think it can actually fail, because the wchar strings are
> zero-terminated. But it does look like there's a missed speedup here.
> (Tatsuo, do you agree?)
>
> Thanks for the report!
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-01-30 17:01:37 Sync vs. fsync during checkpoint
Previous Message Eric Ridge 2004-01-30 16:11:47 Re: Question about indexes

Browse pgsql-patches by date

  From Date Subject
Next Message David Fetter 2004-01-30 22:45:14 Patch for psql startup clarity
Previous Message Tom Lane 2004-01-30 15:31:52 Re: v7.4.1 text_position() patch