Thread: hash_array_extended() needs to pass down collation

hash_array_extended() needs to pass down collation

From
Peter Eisentraut
Date:
I noticed that hash_array_extended() does not pass down the collation to 
the element's collation function, unlike hash_array().  As a 
consequence, hash partitioning using text arrays as partition key fails.

The attached patch fixes this.  I propose to backpatch this.

Attachment

Re: hash_array_extended() needs to pass down collation

From
Heikki Linnakangas
Date:
On 02/11/2020 09:40, Peter Eisentraut wrote:
> I noticed that hash_array_extended() does not pass down the collation to
> the element's collation function, unlike hash_array().  As a
> consequence, hash partitioning using text arrays as partition key fails.
> 
> The attached patch fixes this.  I propose to backpatch this.

+1. Straightforward oversight in commit 5e1963fb764e.

- Heikki



Re: hash_array_extended() needs to pass down collation

From
Tom Lane
Date:
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> I noticed that hash_array_extended() does not pass down the collation to 
> the element's collation function, unlike hash_array().  As a 
> consequence, hash partitioning using text arrays as partition key fails.

> The attached patch fixes this.  I propose to backpatch this.

LGTM

            regards, tom lane



Re: hash_array_extended() needs to pass down collation

From
Michael Paquier
Date:
On Mon, Nov 02, 2020 at 10:01:53AM -0500, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>> I noticed that hash_array_extended() does not pass down the collation to
>> the element's collation function, unlike hash_array().  As a
>> consequence, hash partitioning using text arrays as partition key fails.
>
>> The attached patch fixes this.  I propose to backpatch this.
>
> LGTM

+1.
--
Michael

Attachment

Re: hash_array_extended() needs to pass down collation

From
Peter Eisentraut
Date:
On 2020-11-03 11:48, Michael Paquier wrote:
> On Mon, Nov 02, 2020 at 10:01:53AM -0500, Tom Lane wrote:
>> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>>> I noticed that hash_array_extended() does not pass down the collation to
>>> the element's collation function, unlike hash_array().  As a
>>> consequence, hash partitioning using text arrays as partition key fails.
>>
>>> The attached patch fixes this.  I propose to backpatch this.
>>
>> LGTM
> 
> +1.

committed