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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to