-1

Assume there is a table with 5 columns (id ,first_name (text),last_name(text), product_name(text) and available(boolean)).

CREATE INDEX IF NOT EXISTS "idx-firstname-lower + product_name" 
  ON persons (LOWER(first_name), product_name) WHERE available;
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
KI0821
  • 1
  • 2

1 Answers1

1

Yes, you can create that index, although I would reconsider the index name. Use a standard conforming name like mytab_lower_firstname_productname_idx.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263