Re: BUG #14608: no index scan with NOT IN and ENUM

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: lucas(at)lucas-nussbaum(dot)net
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14608: no index scan with NOT IN and ENUM
Date: 2017-03-31 19:04:04
Message-ID: 874ly95ky8.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "lucas" == lucas <lucas(at)lucas-nussbaum(dot)net> writes:

lucas> I would expect postgresql to figure out that "not in ('1', '2',
lucas> '3', '4')" is equivalent to "d = '0'" given that the column is
lucas> NOT NULL. And use the index.

Well, whatever you expect, nobody has ever written code for the planner
to make it figure that out (and it doesn't seem likely to be a major
win, so probably not surprising that nobody did it).

So this is not a bug.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-03-31 19:49:26 Re: BUG #14608: no index scan with NOT IN and ENUM
Previous Message lucas 2017-03-31 18:53:01 BUG #14608: no index scan with NOT IN and ENUM