COLLATE: Hash partition vs UPDATE

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: COLLATE: Hash partition vs UPDATE
Date: 2019-04-08 16:33:55
Message-ID: a620f85a-42ab-e0f3-3337-b04b97e2e2f5@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

The following case

-- test.sql --
CREATE TABLE test (a text PRIMARY KEY, b text) PARTITION BY HASH (a);
CREATE TABLE test_p0 PARTITION OF test FOR VALUES WITH (MODULUS 2,
REMAINDER 0);
CREATE TABLE test_p1 PARTITION OF test FOR VALUES WITH (MODULUS 2,
REMAINDER 1);
-- CREATE INDEX idx_test_b ON test USING HASH (b);

INSERT INTO test VALUES ('aaaa', 'aaaa');

-- Regression
UPDATE test SET b = 'bbbb' WHERE a = 'aaaa';
-- test.sql --

fails on master, which includes [1], with

psql:test.sql:9: ERROR: could not determine which collation to use for
string hashing
HINT: Use the COLLATE clause to set the collation explicitly.

It passes on 11.x.

I'll add it to the open items list.

[1]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=5e1963fb764e9cc092e0f7b58b28985c311431d9

Best regards,
Jesper

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-04-08 16:38:59 Re: Status of the table access method work
Previous Message Fabien COELHO 2019-04-08 15:58:46 pgbench - implement strict TPC-B benchmark