Re: v7.4.1 text_position() patch - Mailing list pgsql-patches

From Korea PostgreSQL Users' Group
Subject Re: v7.4.1 text_position() patch
Date
Msg-id 000901c3e74d$aee9c5c0$cdcb56dc@paolo.net
Whole thread Raw
In response to v7.4.1 text_position() patch  ("Korea PostgreSQL Users' Group" <pgsql-kr@postgresql.or.kr>)
Responses Re: v7.4.1 text_position() patch
List 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@sss.pgh.pa.us>
To: "Korea PostgreSQL Users' Group" <pgsql-kr@postgresql.or.kr>
Cc: <pgsql-patches@postgresql.org>; "Tatsuo Ishii" <t-ishii@sra.co.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
>

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: v7.4.1 text_position() patch
Next
From: David Fetter
Date:
Subject: Patch for psql startup clarity