CITEXT
CITEXT is a SQL data type in the PostgreSQL Specific category. PostgreSQL: case-insensitive text type. Behaves like TEXT but comparisons are case-insensitive. The syntax is column CITEXT. It returns case-insensitive text. A typical example: CREATE EXTENSION IF NOT EXISTS citext; CREATE TABLE users (username CITEXT UNIQUE); INSERT INTO users VALUES ('Alice'); SELECT * FROM users WHERE username = 'alice'; -- Found! (case-insensitive) -- Compared to: -- SELECT * FROM users WHERE LOWER(username) = LOWER('alice'); -- index can't be used -- CITEXT can use a plain B-tree index for case-insensitive lookups A close relative is SERIAL, which postgreSQL auto-increment type. Creates an INTEGER column with a sequence. Equivalent to AUTO_INCREMENT in MySQL. A close relative is RETURNING, which postgreSQL extension that returns values from INSERT/UPDATE/DELETE statements (like OUTPUT in SQL Server). A close relative is ARRAY, which postgreSQL supports array columns and array operations. Can be multi-dimensional.