Re: gsoc, oprrest function for text search take 2 - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: gsoc, oprrest function for text search take 2
Date
Msg-id 488ECE77.2050103@enterprisedb.com
Whole thread Raw
In response to gsoc, oprrest function for text search take 2  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
Responses Re: gsoc, oprrest function for text search take 2  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
List pgsql-hackers
Jan Urbański wrote:
> Another thing are cstring_to_text_with_len calls. I'm doing them so I 
> can use bttextcmp in bsearch(). I think I could come up with a dedicated 
> function to return text Datums and WordEntries (read: non-NULL 
> terminated strings with a given length).

Just keep them as cstrings and use strcmp. We're only keeping the array 
sorted so that we can binary search it, so we don't need proper 
locale-dependent collation. Note that we already assume that two strings 
('text's) are equal if and only if their binary representations are 
equal (texteq() uses strcmp).

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Python 2.5 vs the buildfarm
Next
From: Peter Eisentraut
Date:
Subject: Re: patch: Add a separate TRUNCATE permission