Re: should check collations when creating partitioned index - Mailing list pgsql-hackers

From Tom Lane
Subject Re: should check collations when creating partitioned index
Date
Msg-id 1327559.1700497533@sss.pgh.pa.us
Whole thread Raw
In response to Re: should check collations when creating partitioned index  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: should check collations when creating partitioned index
List pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> On 14.11.23 17:15, Tom Lane wrote:
>> I don't love the patch details though.  It seems entirely wrong to check
>> this before we check the opclass match.

> Not sure why?  The order doesn't seem to matter?

The case that was bothering me was if we had a non-collated type
versus a collated type.  That would result in throwing an error
about collation mismatch, when complaining about the opclass seems
more apropos.  However, if we do this:

> I see.  That means we shouldn't raise an error on a mismatch but just do
>      if (key->partcollation[i] != collationIds[j])
>          continue;

it might not matter much.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Use of backup_label not noted in log
Next
From: Tom Lane
Date:
Subject: Re: On non-Windows, hard depend on uselocale(3)