TEMPORAL JOIN: USING does not work with merged version of 9.6
A=# table test;
a | b | ts | te
---+---+----+----
a | B | 1 | 7
b | B | 3 | 9
c | G | 8 | 10
(3 rows)
A=# select * from (test t1 period join with(ts,te,ts,te) as (tts, tte) test t2 on t1.a = t2.a) c;
a | b | a | b | tts | tte
---+---+---+---+-----+-----
a | B | a | B | 1 | 7
b | B | b | B | 3 | 9
c | G | c | G | 8 | 10
(3 rows)
A=# select * from (test t1 period join with(ts,te,ts,te) as (tts, tte) test t2 using(a)) c;
ERROR: unrecognized node type: 2113941876
Backtrace:
#0 copyObject (from=0x1ed7bc0) at copyfuncs.c:5149
#1 0x00000000006fad45 in _copyList (from=0x1f09f68) at copyfuncs.c:4246
#2 0x00000000006fb8d1 in copyObject (from=0x1f09f68) at copyfuncs.c:4668
#3 0x00000000006f4ec9 in _copyColumnRef (from=0x1f09f08) at copyfuncs.c:2391
#4 0x00000000006fc206 in copyObject (from=0x1f09f08) at copyfuncs.c:5015
#5 0x00000000006f4e49 in _copyAExpr (from=0x1f0a088) at copyfuncs.c:2379
#6 0x00000000006fc1f1 in copyObject (from=0x1f0a088) at copyfuncs.c:5012
#7 0x00000000006fad45 in _copyList (from=0x1f0a190) at copyfuncs.c:4246
#8 0x00000000006fb8d1 in copyObject (from=0x1f0a190) at copyfuncs.c:4668
#9 0x00000000006f26a8 in _copyBoolExpr (from=0x1f0a1c8) at copyfuncs.c:1438
#10 0x00000000006fb59e in copyObject (from=0x1f0a1c8) at copyfuncs.c:4535
#11 0x00000000006f3860 in _copyJoinExpr (from=0x1f0b330) at copyfuncs.c:1933
#12 0x00000000006fb7ff in copyObject (from=0x1f0b330) at copyfuncs.c:4622
#13 0x00000000006f380f in _copyJoinExpr (from=0x1ed8358) at copyfuncs.c:1930
#14 0x00000000006fb7ff in copyObject (from=0x1ed8358) at copyfuncs.c:4622
#15 0x00000000005ea5fe in transformTemporalJoin (j=0x1ed8358) at parse_temporal.c:2519
#16 0x00000000005baa13 in transformFromClauseItem (pstate=0x1ed8678, n=0x1ed8358, top_rte=0x7ffe19a21ac0, top_rti=0x7ffe19a21abc, namespace=0x7ffe19a21ac8) at parse_clause.c:999
#17 0x00000000005b8f78 in transformFromClause (pstate=0x1ed8678, frmList=0x1ed84c8) at parse_clause.c:131
#18 0x0000000000583c0f in transformSelectStmt (pstate=0x1ed8678, stmt=0x1ed8500) at analyze.c:1114
#19 0x00000000005822f1 in transformStmt (pstate=0x1ed8678, parseTree=0x1ed8500) at analyze.c:270
#20 0x000000000058221c in transformTopLevelStmt (pstate=0x1ed8678, parseTree=0x1ed8500) at analyze.c:215
#21 0x0000000000581f99 in parse_analyze (parseTree=0x1ed8500, sourceText=0x1ed6fd8 "select * from (test t1 period join with(ts,te,ts,te) as (tts, tte) test t2 using(a)) c;", paramTypes=0x0, numParams=0) at analyze.c:108
#22 0x0000000000826cae in pg_analyze_and_rewrite (parsetree=0x1ed8500, query_string=0x1ed6fd8 "select * from (test t1 period join with(ts,te,ts,te) as (tts, tte) test t2 using(a)) c;", paramTypes=0x0, numParams=0) at postgres.c:658
#23 0x0000000000827296 in exec_simple_query (query_string=0x1ed6fd8 "select * from (test t1 period join with(ts,te,ts,te) as (tts, tte) test t2 using(a)) c;") at postgres.c:1019
#24 0x000000000082b7f2 in PostgresMain (argc=1, argv=0x1e5f418, dbname=0x1e5f280 "A", username=0x1e5f260 "pemoser") at postgres.c:4074
#25 0x000000000079f061 in BackendRun (port=0x1e84500) at postmaster.c:4262
#26 0x000000000079e776 in BackendStartup (port=0x1e84500) at postmaster.c:3936
#27 0x000000000079ae46 in ServerLoop () at postmaster.c:1693
#28 0x000000000079a432 in PostmasterMain (argc=3, argv=0x1e5e3a0) at postmaster.c:1301
#29 0x00000000006e21d7 in main (argc=3, argv=0x1e5e3a0) at main.c:228