[HACKERS] fix empty array expression in get_qual_for_list() - Mailing list pgsql-hackers

From Jeevan Ladhe
Subject [HACKERS] fix empty array expression in get_qual_for_list()
Date
Msg-id CAOgcT0OChrN--uuqH6wG6Z8+nxnCWJ+2Q-uhnK4KOANdRRxuAw@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] fix empty array expression in get_qual_for_list()
Re: [HACKERS] fix empty array expression in get_qual_for_list()
List pgsql-hackers
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 empty array to avoid
executing ANY expression.

2.Also, we are constructing an expression using index 0 of arrays in
PartitionKey since currently we have only one column for list partition in key,
added an assert for this.

PFA.

Regards,
Jeevan Ladhe
Attachment

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT
Next
From: Jeevan Ladhe
Date:
Subject: Re: [HACKERS] fix empty array expression in get_qual_for_list()