User-defined collation sequences

By default, when QDB compares two text values, the result of the comparison is determined using memcmp(), regardless of the encoding of the string. QDB lets you supply arbitrary comparison functions, known as user-defined collation sequences, to be used instead of memcmp(). See the Writing User-Defined Functions chapter for more information.

Aside from the default collation sequence BINARY, implemented using memcmp(), QDB features two extra built-in collation sequences intended for testing purposes, NOCASE and RTRIM: