Re: COLLATE: Hash partition vs UPDATE

2019-04-15 Thread Amit Langote
On 2019/04/16 5:47, Tom Lane wrote: > Amit Langote writes: >> Attached updated patch. > > LGTM, pushed. Thank you. Regards, Amit

Re: COLLATE: Hash partition vs UPDATE

2019-04-15 Thread Tom Lane
Amit Langote writes: > Attached updated patch. LGTM, pushed. regards, tom lane

Re: COLLATE: Hash partition vs UPDATE

2019-04-15 Thread Amit Langote
Thanks for the review. On 2019/04/15 5:50, Tom Lane wrote: > Jesper Pedersen writes: >> Yeah, that works here - apart from an issue with the test case; fixed in >> the attached. > > Couple issues spotted in an eyeball review of that: > > * There is code that supposes that partsupfunc[] is the

Re: COLLATE: Hash partition vs UPDATE

2019-04-14 Thread Tom Lane
Jesper Pedersen writes: > Yeah, that works here - apart from an issue with the test case; fixed in > the attached. Couple issues spotted in an eyeball review of that: * There is code that supposes that partsupfunc[] is the last field of ColumnsHashData, eg fcinfo->flinfo->fn_extra

Re: COLLATE: Hash partition vs UPDATE

2019-04-09 Thread Amit Langote
On Tue, Apr 9, 2019 at 9:44 PM Jesper Pedersen wrote: > > Hi Amit, > > On 4/8/19 11:18 PM, Amit Langote wrote: > > As of this commit, hashing functions hashtext() and hashtextextended() > > require a valid collation to be passed in. ISTM, > > satisfies_hash_partition() that's called by hash

Re: COLLATE: Hash partition vs UPDATE

2019-04-09 Thread Jesper Pedersen
Hi Amit, On 4/8/19 11:18 PM, Amit Langote wrote: As of this commit, hashing functions hashtext() and hashtextextended() require a valid collation to be passed in. ISTM, satisfies_hash_partition() that's called by hash partition constraint checking should have been changed to use

Re: COLLATE: Hash partition vs UPDATE

2019-04-08 Thread Amit Langote
Hi Jesper, On 2019/04/09 1:33, Jesper Pedersen wrote: > 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

COLLATE: Hash partition vs UPDATE

2019-04-08 Thread Jesper Pedersen
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