Re: [HACKERS] GSets: Getting collation related error when GSets has text column

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [HACKERS] GSets: Getting collation related error when GSets has text column
Date: 2015-07-17 17:33:44
Message-ID: 87pp3qheq5.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

>>>>> "Jeevan" == Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> writes:

Jeevan> Hi,

Jeevan> When we have text column in the GROUPING SETS (and with some specific
Jeevan> order of columns), we are getting error saying
Jeevan> "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 we are not remapping
Jeevan> the grpColIdx correctly.

Yup.

Jeevan> Attached patch which attempts to fix this issue. However I am
Jeevan> not sure whether it is correct. But it does not add any new
Jeevan> 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)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2015-07-17 18:57:22 Re: Grouping Sets: Fix unrecognized node type bug
Previous Message Tom Lane 2015-07-17 16:24:51 Re: BUG #13504: Types in math functions table is incorrect

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-07-17 18:34:53 Re: Asynchronous execution on FDW
Previous Message Pavel Stehule 2015-07-17 17:02:04 Re: option for psql - short list non template database