pgsql: Enable hash partitioning of text arrays

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Enable hash partitioning of text arrays
Date: 2020-11-04 11:50:18
Message-ID: E1kaHIw-0002dh-TI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Enable hash partitioning of text arrays

hash_array_extended() needs to pass PG_GET_COLLATION() to the hash
function of the element type. Otherwise, the hash function of a
collation-aware data type such as text will error out, since the
introduction of nondeterministic collation made hash functions require
a collation, too.

The consequence of this is that before this change, hash partitioning
using an array over text in the partition key would not work.

Reviewed-by: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://www.postgresql.org/message-id/flat/32c1fdae-95c6-5dc6-058a-a90330a3b621%40enterprisedb.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/82d4a2a7d63e79f6a6724f366cfaa4beed6b8326

Modified Files
--------------
src/backend/utils/adt/arrayfuncs.c | 2 +-
src/test/regress/expected/collate.icu.utf8.out | 50 ++++++++++++++++++++++++++
src/test/regress/sql/collate.icu.utf8.sql | 26 ++++++++++++++
3 files changed, 77 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2020-11-04 12:03:03 Re: pgsql: Get rid of the dedicated latch for signaling the startup process
Previous Message Fujii Masao 2020-11-04 11:20:09 Re: pgsql: Get rid of the dedicated latch for signaling the startup process