Re: Why is NULL not indexable?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why is NULL not indexable?
Date: 2001-06-26 15:02:41
Message-ID: 3156.993567761@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> I can't work out what the 'strategy' bit refers to. All I can find in the
> source code is references to tables of magic numbers. I guess what I really
> want to know is, how hard would it be to fix?

I believe the main problem is that IS NULL and IS NOT NULL are not
operators (they don't have pg_operator entries), and all of the planning
and indexscan execution machinery is designed around operators. Binary
operators, at that.

It's possible that this could be hacked around by creating dummy
pg_operator entries for them, but my bet is that cleaning up the loose
ends and no-longer-valid coding assumptions would be a nontrivial task.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message martin.chantler 2001-06-26 15:14:13 Re: More Red Hat information
Previous Message Peter Eisentraut 2001-06-26 14:45:34 Re: Confused about SHMMAX