Re: Problem with index in OR'd expression

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: postgresql(dot)org(at)tgice(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with index in OR'd expression
Date: 2006-12-26 21:54:50
Message-ID: 9115.1167170090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

postgresql(dot)org(at)tgice(dot)com writes:
> I would submit that in that situation, it would be
> reasonable for a user to expect my suggested syntax to still use the
> indicated indexes.

The only thing that will make that work is if "indexed_col IS NULL" were
an indexable condition, which it isn't because the PG index API only
supports "indexed_col operator something" as an indexable condition
(IS NULL is not an operator, and even if it were, there's no "something"
on its righthand side). Fixing this has been on the radar screen for
awhile, but it's not done, largely for lack of agreement about a
reasonably clean way to change that API.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2006-12-26 23:44:39 Re: Clustering & Load Balancing & Replication
Previous Message postgresql.org 2006-12-26 21:12:36 Re: Problem with index in OR'd expression