GROUP BY PERIOD: Ambiguous columns with `using(colname)`
Created by: Piiit
A=# select * from rt, e group by period with(t) a;
ERROR: column reference "a" is ambiguous
A=# table rt;
a | t
---+-------
1 | [1,8)
2 | [2,6)
1 | [4,7)
(3 rows)
A=# table e;
a | b | t
---+---+--------
A | A | [1,7)
A | B | [3,18)
B | A | [1,25)
(3 rows)
A=# select * from rt, e;
a | t | a | b | t
---+-------+---+---+--------
1 | [1,8) | A | A | [1,7)
1 | [1,8) | A | B | [3,18)
1 | [1,8) | B | A | [1,25)
2 | [2,6) | A | A | [1,7)
2 | [2,6) | A | B | [3,18)
2 | [2,6) | B | A | [1,25)
1 | [4,7) | A | A | [1,7)
1 | [4,7) | A | B | [3,18)
1 | [4,7) | B | A | [1,25)
(9 rows)