From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: fix hard-coded index in make_partition_op_expr |
Date: | 2017-05-18 02:04:00 |
Message-ID: | 12137aa5-0b5b-2084-4c9b-bcd670cf23c2@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2017/05/18 3:43, Robert Haas wrote:
> On Wed, May 17, 2017 at 5:38 AM, Jeevan Ladhe
> <jeevan(dot)ladhe(at)enterprisedb(dot)com> wrote:
>> While browsing through the partitioning code, I noticed that a recent commit
>> f8bffe9e6d700fd34759a92e47930ce9ba7dcbd5, which fixes multi-column range
>> partitioning constraints, introduced a function make_partition_op_expr, that
>> takes keynum as a input parameter to identify the index of the partition
>> key.
>> In case of range partition we can have multiple partition keys but for list
>> partition we have only one. Considering that, I think following code does
>> not
>> cause any side-effect logically(and may be a oversight while moving the code
>> from function get_qual_for_list to this function):
>>
>> saopexpr->inputcollid = key->partcollation[0];
>> saopexpr->args = list_make2(arg1, arg2);
>>
>> But as we have keynum now, should we be using it to index
>> key->partcollation,
>> instead of a hard coded '0'.
>
> Agreed. Committed your patch.
Me too, thanks both.
Regards,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-05-18 02:25:55 | Re: Race conditions with WAL sender PID lookups |
Previous Message | Michael Paquier | 2017-05-18 02:01:57 | Re: [Proposal] Allow users to specify multiple tables in VACUUM commands |