Re: PATCH: CITEXT 2.0 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: PATCH: CITEXT 2.0
Date
Msg-id 20080707185402.GC4681@alvh.no-ip.org
Whole thread Raw
In response to Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
David E. Wheeler wrote:
> On Jul 7, 2008, at 11:44, Alvaro Herrera wrote:
>
>>> I'm confused. What's the difference between strncmp() and  
>>> varstr_cmp()?
>>> And why would I use one in one place and the other elsewhere?  
>>> Shouldn't
>>> they be used consistently?
>>
>> Not necessarily -- see texteq.  I think the point is that varstr_cmp()
>> is a lot slower.
>
> Then why shouldn't I use strncmp() for all comparisons?

I have no idea :-) -- because it's not locale-aware perhaps.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: PATCH: CITEXT 2.0
Next
From: Zdenek Kotala
Date:
Subject: Re: PATCH: CITEXT 2.0 v2