Re: Why is NULL not indexable? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why is NULL not indexable?
Date
Msg-id 3156.993567761@sss.pgh.pa.us
Whole thread Raw
In response to Why is NULL not indexable?  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Why is NULL not indexable?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.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

pgsql-general by date:

Previous
From: Edwin Grubbs
Date:
Subject: timestamp to int
Next
From: wsheldah@lexmark.com
Date:
Subject: Large objects in web applications