Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLG1p-0003eK-3o for pgsql-bugs@arkaria.postgresql.org; Sun, 25 Dec 2016 21:08:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cLG1o-0000sU-Mw for pgsql-bugs@arkaria.postgresql.org; Sun, 25 Dec 2016 21:08:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cLG19-000068-Vj for pgsql-bugs@postgresql.org; Sun, 25 Dec 2016 21:07:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cLG15-0008IU-E8 for pgsql-bugs@postgresql.org; Sun, 25 Dec 2016 21:07:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uBPL7b7j017568; Sun, 25 Dec 2016 16:07:37 -0500 From: Tom Lane To: t.katsumata1122@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14476: crosstabview reports mistaken location In-reply-to: <20161225021519.10139.45460@wrigleys.postgresql.org> References: <20161225021519.10139.45460@wrigleys.postgresql.org> Comments: In-reply-to t.katsumata1122@gmail.com message dated "Sun, 25 Dec 2016 02:15:19 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17566.1482700057.1@sss.pgh.pa.us> Date: Sun, 25 Dec 2016 16:07:37 -0500 Message-ID: <17567.1482700057@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) 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 t.katsumata1122@gmail.com writes: > I'm playing with crosstabview, PostgreSQL9.6 new feature. > And I noticed the error message is not correct when it has duplicate data. Yup, you're right. > It seems this problem is reproduced when number of row is higher than 10. It looks to me like the triggering condition is that the data values aren't in ASCII (strcmp()) order. As long as they are, the "pivot value" array order matches the rank order and so the error message accidentally selects the appropriate array entries. Fix pushed, thanks for the report! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs