TEMPORAL JOINS: Cannot reference join arguments from target list
Created by: Piiit
Currently we support only binary temporal joins. These must have a name. Otherwise, we would need to modify the namespace code of PostgreSQL, which is considered future work.
From gram.y:
'(' joined_table ')' alias_clause
Original comment (not practical, since we cannot access all parts of the query from CTEs): We need to put the WITH clause above the original query, s.t. we can access both sides (i.e., larg/rarg) of the original join query.
A=# select r.a,s.a,tts from rt r right join period with (t,t) rt s on r.a=s.a;
ERROR: missing FROM-clause entry for table "r"
LINE 1: select r.a,s.a,tts from rt r right join period with (t,t) rt...
^