Re: fix empty array expression in get_qual_for_list()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fix empty array expression in get_qual_for_list()
Date: 2017-06-26 14:44:07
Message-ID: 8897.1498488247@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com> writes:
> In case of list partitioned table:
> 1. If there is a partition accepting only null values and nothing else, then
> currently the partition constraints for such a partition are constructed as
> "((a IS NULL) OR (a = ANY (ARRAY[]::integer[])))".
> I think there it is better to avoid constructing an empty array to avoid
> executing ANY expression.

Looks like a good idea, pushed with trivial stylistic adjustments.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-06-26 14:45:35 Re: intermittent failures in Cygwin from select_parallel tests
Previous Message Andrew Dunstan 2017-06-26 14:39:49 Re: intermittent failures in Cygwin from select_parallel tests