hash_array_extended() needs to pass down collation

Started by Peter Eisentrautover 5 years ago5 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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.

Attachments:

0001-Enable-hash-partitioning-of-text-arrays.patchtext/plain; charset=UTF-8; name=0001-Enable-hash-partitioning-of-text-arrays.patch; x-mac-creator=0; x-mac-type=0Download+77-2
#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Peter Eisentraut (#1)
Re: hash_array_extended() needs to pass down collation

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: hash_array_extended() needs to pass down collation

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

#4Michael Paquier
michael@paquier.xyz
In reply to: Tom Lane (#3)
Re: hash_array_extended() needs to pass down collation

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
#5Peter Eisentraut
peter_e@gmx.net
In reply to: Michael Paquier (#4)
Re: hash_array_extended() needs to pass down collation

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