e (data) WHERE category = 1;
CREATE INDEX mytable_cat_2 ON mytable (data) WHERE category = 2;
CREATE INDEX mytable_cat_3 ON mytable (data) WHERE category = 3;
...
CREATE INDEX mytable_cat_<em class="replaceable"><code>N</code></em> ON mytable (data) WHERE category = <em class="replaceable"><code>N</code></em>;
</pre><p>

    This is a bad idea!  Almost certainly, you'll be better off with a
    single non-partial index, declared like

</p><pre class="programlisting">
CREATE INDEX mytable_cat_data ON mytable