Re: GSets: Getting collation related error when GSets has text column - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: GSets: Getting collation related error when GSets has text column
Date
Msg-id 87pp3qheq5.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to GSets: Getting collation related error when GSets has text column  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
List pgsql-hackers
>>>>> "Jeevan" == Jeevan Chalke <jeevan.chalke@enterprisedb.com> writes:
Jeevan> Hi,
Jeevan> When we have text column in the GROUPING SETS (and with some specificJeevan> order of columns), we are getting
errorsayingJeevan> "could not determine which collation to use for string comparison"
 

Good catch.
Jeevan> After spending enough time, If I understood the code correctly,Jeevan> we are re-ordering the sort columns but
weare not remappingJeevan> the grpColIdx correctly.
 

Yup.
Jeevan> Attached patch which attempts to fix this issue. However I amJeevan> not sure whether it is correct. But it
doesnot add any newJeevan> issues as such.  Added few test in the patch as well.
 

I wouldn't have bothered moving the Assert; it can be removed. Otherwise
it looks correct.

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: option for psql - short list non template database
Next
From: Robert Haas
Date:
Subject: Re: Asynchronous execution on FDW