Re: [HACKERS] fix empty array expression in get_qual_for_list()

2017-06-26 Thread Jeevan Ladhe
On Mon, Jun 26, 2017 at 8:14 PM, Tom Lane wrote: > Jeevan Ladhe 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

Re: [HACKERS] fix empty array expression in get_qual_for_list()

2017-06-26 Thread Tom Lane
Jeevan Ladhe 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 t

Re: [HACKERS] fix empty array expression in get_qual_for_list()

2017-06-26 Thread Jeevan Ladhe
Here is an example: create table t1 ( a int) partition by list (a); create table t11 partition of t1 for values in (null); *Current constraints:* postgres=# \d+ t11; Table "public.t11" Column | Type | Collation | Nullable | Default | Storage | Stats target

[HACKERS] fix empty array expression in get_qual_for_list()

2017-06-26 Thread Jeevan Ladhe
Hi, 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 emp