O'Reilly logo
  • Goldie Fernandes thinks this is interesting:

CREATE INDEX idx_name ON t_test (name)
WHERE name NOT IN ('hans', 'paul');
CREATE INDEX

From

Cover of Mastering PostgreSQL 10

Note

How to create a partial index