| From: | Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com> |
|---|---|
| To: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | fix empty array expression in get_qual_for_list() |
| Date: | 2017-06-26 11:23:27 |
| Message-ID: | CAOgcT0OChrN--uuqH6wG6Z8+nxnCWJ+2Q-uhnK4KOANdRRxuAw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| fix_empty_arry_get_qual_for_list.patch | application/octet-stream | 2.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeevan Ladhe | 2017-06-26 11:30:15 | Re: fix empty array expression in get_qual_for_list() |
| Previous Message | Kyotaro HORIGUCHI | 2017-06-26 09:44:12 | Re: Race between SELECT and ALTER TABLE NO INHERIT |