Skip site navigation (1) Skip section navigation (2)

Re: gsoc, oprrest function for text search take 2

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: Jan Urbański <j(dot)urbanski(at)students(dot)mimuw(dot)edu(dot)pl>
Cc: "Postgres - Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gsoc, oprrest function for text search take 2
Date: 2008-07-29 08:01:59
Message-ID: (view raw or whole thread)
Lists: 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

In response to


pgsql-hackers by date

Next:From: Peter EisentrautDate: 2008-07-29 08:03:38
Subject: Re: patch: Add a separate TRUNCATE permission
Previous:From: Peter EisentrautDate: 2008-07-29 07:58:33
Subject: Re: Python 2.5 vs the buildfarm

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group