"Mario Weilguni" <mario(dot)weilguni(at)icomedias(dot)com> writes:
> I noticed that the planner is unable to select an index scan when a partial
> index is available, the partial index is based on a "NOT NULL" condition.
It wants you to do this:
select id from str where url='foobar' and url is not null;
I know and you know that "url='foobar'" implies url is not null,
but the code that checks for applicability of partial indexes is not
that bright.
regards, tom lane