Skip site navigation (1) Skip section navigation (2)

BUG #14476: crosstabview reports mistaken location

From: t(dot)katsumata1122(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14476: crosstabview reports mistaken location
Date: 2016-12-25 02:15:19
Message-ID: 20161225021519.10139.45460@wrigleys.postgresql.org (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14476
Logged by:          Tomonari Katsumata
Email address:      t(dot)katsumata1122(at)gmail(dot)com
PostgreSQL version: 9.6.1
Operating system:   macOS Sierra 10.12.1
Description:        

Hi,

I'm playing with crosstabview, PostgreSQL9.6 new feature.
And I noticed the error message is not correct when it has duplicate data.

-- How to reproduce -----
create table ctv(x int, y int, v text);
insert into ctv values (1, generate_series(1,10), '*');
insert into ctv values (1, 10, '*'); -- duplicate data
select * from ctv;
\crosstabview
-------------------------

The last 2 statements work like below.

postgres=# select * from ctv;
 x | y  | v
---+----+---
 1 |  1 | *
 1 |  2 | *
 1 |  3 | *
 1 |  4 | *
 1 |  5 | *
 1 |  6 | *
 1 |  7 | *
 1 |  8 | *
 1 |  9 | *
 1 | 10 | *
 1 | 10 | *
(11 rows)

postgres=# \crosstabview
\crosstabview: query result contains multiple data values for row "1",
column "9"


In above case, although there is duplicate data on row(x):1 and
column(y):10,
row(x):1 and column(y):9 is not duplicate.

So I think it should be the message say
  \crosstabview: query result contains multiple data values for row "1",
column "10"


It seems this problem is reproduced when number of row is higher than 10.
Could you check this, please?

Best regards,
-------
Tomonari Katsumata



Responses

pgsql-bugs by date

Next:From: meirav.rathDate: 2016-12-25 15:03:28
Subject: BUG #14477: Can't start service because of upgrade-like installation
Previous:From: Michael PaquierDate: 2016-12-24 07:43:47
Subject: Re: BUG #14475: buffer overflow and segmentation fault

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group