The CITEXT represents a case-insensitive string. Like STRING values, CITEXT values preserve their casing when stored and retrieved. Unlike STRING values, comparisons between CITEXT values are case-insensitive for all Unicode characters that have a defined uppercase/lowercase mapping (e.g., 'É' = 'é').Equality operators (=, !=, <>) and ordering operators (<, >, etc.) treat CITEXT values as case-insensitive by default. Refer to the example.
CITEXT compares values as a STRING column with the und-u-ks-level2 , meaning it is case-insensitive but accent-sensitive.
As with STRING, CITEXT values should be kept below 64 KB for best performance. Because CITEXT values resort to a collation engine on every comparison, CITEXT columns and indexes consume marginally more CPU and memory than their STRING equivalents.
An ordering comparison is also case-insensitive with CITEXT:
SELECT username FROM logins WHERE username < 'Xavi';
username------------ Roach lincoln(2 rows)
For case-sensitive comparisons on CITEXT values, cast to STRING explicitly. In the default Unicode ordering, an uppercase value is considered less than the lowercase value in the table:
SELECT username FROM logins WHERE username::STRING < 'Xavi';