Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZG9Wp-0001OS-Gt for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jul 2015 17:34:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZG9Wo-0002Vn-1Y for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jul 2015 17:34:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZG9WA-000192-Tu; Fri, 17 Jul 2015 17:33:50 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZG9W8-0005u8-2H; Fri, 17 Jul 2015 17:33:50 +0000 Received: from localhost ([127.0.0.1]:33191 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZG9W4-000N1F-Fp; Fri, 17 Jul 2015 17:33:44 +0000 From: Andrew Gierth To: Jeevan Chalke , Atri Sharma Cc: PostgreSQL Hackers , Postgres-Bugs Subject: Re: [HACKERS] GSets: Getting collation related error when GSets has text column In-Reply-To: (Jeevan Chalke's message of "Fri, 17 Jul 2015 18:55:52 +0530") Message-ID: <87pp3qheq5.fsf@news-spur.riddles.org.uk> References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Fri, 17 Jul 2015 18:33:44 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>>>> "Jeevan" == Jeevan Chalke 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) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs