From: furstenheim@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14173: Not using partitions with ANY(ARRAY[...])
Date: Fri, 03 Jun 2016 10:37:44 +0000
Message-ID: <20160603103744.30386.59358@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14173
Logged by: Gabriel f
Email address: furstenheim@gmail.com
PostgreSQL version: 9.5.2
Operating system: Ubuntu 64bit
Description:
http://stackoverflow.com/questions/34766671/how-to-query-against-several-tables-from-a-partition-in-...
I'm querying a table partitioned wrt to some variable, say mvar. If I do:
explain select * from mtable where mvar = 'a' or mvar = 'b'
then the query planner goes only into the two subtables related to 'a' and
'b'.
The same works with the static in
select * from mtable where mvar IN ('a', 'b')
However, it does not work if I use array
select * from mtable where mvar = ANY(ARRAY['a','b'])
the query planner schedules all subtables of the partition.
I've seen the error both in 9.4 and in 9.5.2. However, according to some
comment in the provided link it did work properly with 9.3
Thanks
--
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: furstenheim@gmail.com
Subject: Re: BUG #14173: Not using partitions with ANY(ARRAY[...])
In-Reply-To: <20160603103744.30386.59358@wrigleys.postgresql.org>
References: <20160603103744.30386.59358@wrigleys.postgresql.org>
* 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