From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: lucas@lucas-nussbaum.net
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14608: no index scan with NOT IN and ENUM
Date: Fri, 31 Mar 2017 20:04:04 +0100
Message-ID: <874ly95ky8.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <20170331185301.2690.64421@wrigleys.postgresql.org>
References: <20170331185301.2690.64421@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
>>>>> "lucas" == lucas <lucas@lucas-nussbaum.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)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andrew@tao11.riddles.org.uk, lucas@lucas-nussbaum.net
Subject: Re: BUG #14608: no index scan with NOT IN and ENUM
In-Reply-To: <874ly95ky8.fsf@news-spur.riddles.org.uk>
References: <20170331185301.2690.64421@wrigleys.postgresql.org> <874ly95ky8.fsf@news-spur.riddles.org.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox