Open kit-transue opened 5 months ago
This is a result of PostgreSQL's naming of anonymous columns or aggregate functions:
postgres=# select sum(a), sum(b), sum(c) FROM (select 1 a, 2 b, 3 c);
sum | sum | sum
-----+-----+-----
1 | 2 | 3
(1 row)
Other engines may generate distinct column names with aggregate functions:
sqlite> select sum(a), sum(b), sum(c) FROM (select 1 a, 2 b, 3 c);
sum(a)|sum(b)|sum(c)
1|2|3
I don't know if the columns names will always be distinct, and the error can be induced by forcing the columns to collide:
SELECT 1 AS count, 2 AS count, 3 AS count;
Describe the bug
If a query returns more than two unnamed columns, the results table mistakenly uses the values from only the last column for all the unnamed columns after the first.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Screenshots Attached showing "3" as wrong value in middle column of results table; column header wrong for last column in results table.
Desktop (please complete the following information):