Open manwantnosmoke opened 1 year ago
Creating a partial index is impossible right now, but adding support for both index type and where predicate would help creating an index like this:
CREATE UNIQUE INDEX cake_filling_id_idx ON public.cakes USING btree (filling_id) WHERE (filling_id IS NOT NULL);
Hey @manwantnosmoke, would be nice to have. A PR would be welcomed :)
Motivation
Creating a partial index is impossible right now, but adding support for both index type and where predicate would help creating an index like this:
CREATE UNIQUE INDEX cake_filling_id_idx ON public.cakes USING btree (filling_id) WHERE (filling_id IS NOT NULL);