l varchar,
    client_ip inet,
    ...
);
</pre><p>
   </p><p>
    To create a partial index that suits our example, use a command
    such as this:
</p><pre class="programlisting">
CREATE INDEX access_log_client_ip_ix ON access_log (client_ip)
WHERE NOT (client_ip &gt; inet '192.168.100.0' AND
           client_ip &lt; inet '192.168.100.255');
</pre><p>
   </p><p>
    A typical query that can use this index would be:
</p><pre class="programlisting">
SELECT *
FROM access_log
WHERE url = '/index.html' AND cl