Re: [HACKERS] [PATCHES] v7.4.1 text_position() patch

2004-01-31 Thread Joe Conway
Tatsuo Ishii wrote: Thanks. Please apply it. Applied to REL7_3_STABLE. Thanks, Joe ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [HACKERS] [PATCHES] v7.4.1 text_position() patch

2004-01-31 Thread Tatsuo Ishii
> Tatsuo Ishii wrote: > > It's surprising that nobody noticed the bug until now. It seems it has > > been there since 7.3 days. I would like to make a back patch for > > 7.3-stable if nobody objects. > > It's my bug :( -- sorry about that. Here's a 7.3 patch per Tom's nearby > advice. I'll apply

Re: [HACKERS] [PATCHES] v7.4.1 text_position() patch

2004-01-31 Thread Joe Conway
Tatsuo Ishii wrote: It's surprising that nobody noticed the bug until now. It seems it has been there since 7.3 days. I would like to make a back patch for 7.3-stable if nobody objects. It's my bug :( -- sorry about that. Here's a 7.3 patch per Tom's nearby advice. I'll apply if you'd like. Joe I

Re: [HACKERS] [PATCHES] v7.4.1 text_position() patch

2004-01-30 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > It's surprising that nobody noticed the bug until now. It seems it has > been there since 7.3 days. I would like to make a back patch for > 7.3-stable if nobody objects. No objection here. Note that I applied a minimal patch to the 7.4 branch, but a more

Re: [PATCHES] v7.4.1 text_position() patch

2004-01-30 Thread Tatsuo Ishii
> "Korea PostgreSQL Users' Group" <[EMAIL PROTECTED]> writes: > >> Hm. I don't think it can actually fail, because the wchar strings are > >> zero-terminated. > > > [ yes it can ] > > You're right. I was confused at first because I couldn't reproduce the > problem, but then I realized it's beca

Re: [PATCHES] v7.4.1 text_position() patch

2004-01-30 Thread Tom Lane
"Korea PostgreSQL Users' Group" <[EMAIL PROTECTED]> writes: >> Hm. I don't think it can actually fail, because the wchar strings are >> zero-terminated. > [ yes it can ] You're right. I was confused at first because I couldn't reproduce the problem, but then I realized it's because I'm running

Re: [PATCHES] v7.4.1 text_position() patch

2004-01-30 Thread Korea PostgreSQL Users' Group
quot; <[EMAIL PROTECTED]> 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. > (Tats

Re: [PATCHES] v7.4.1 text_position() patch

2004-01-30 Thread Tom Lane
"Korea PostgreSQL Users' Group" <[EMAIL PROTECTED]> writes: > 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. Hm. I don't think it can actually fail, because the wchar strings a

[PATCHES] v7.4.1 text_position() patch

2004-01-30 Thread Korea PostgreSQL Users' Group
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_mb2wcha