Subject: A join crashes the backend

From: Michael Boehlen <[email-masked]>
Date: Fri, 05 Jul 91 12:14:09 N

I created 5 relations and inserted in every relation one tuple as
follows:

>> create p(c1=int4)
>> create q(c1=int4)
>> create r(c1=int4)
>> create u(c1=int4)
>> create v(c1=int4)
>> append p(c1=1)
>> append q(c1=1)
>> append r(c1=1)
>> append u(c1=1)
>> append v(c1=1)

After that I tried to execute the query below:

 retrieve (c1=r1.c1,c2=r2.c1,c3=r3.c1,c4=r4.c1,c5=r5.c1)
 from r1 in p, r2 in q, r3 in r, r4 in u, r5 in v
 where r2.c1=r1.c1
 and r3.c1=r1.c1
 and r4.c1=r1.c1
 and r5.c1=r1.c1

The backend produced the following output:

>>         init_planner()..
>> ((#S(resdom :resno 1 :restype 23 :reslen 4 :resname "null" :reskey 0
:reskeyop 0 :resjunk 0)#S(var :varno 1 :varattno 1 :vartype 23
:vardotfields nil  :vararrayindex 0 :varid )
>> (#S(resdom :resno 1 :restype 23 :reslen 4 :resname "null" :reskey 0
:reskeyop 0 :resjunk 0)#S(var :varno 1 :varattno 1 :vartype 23
:vardotfields nil  :vararrayindex 0 :varid (1
>> 
>> blank
>>          1: c1  (typeid = 23, len = 4, byval = t)
>>          2: c2  (typeid = 23, len = 4, byval = t)
>>          3: c3  (typeid = 23, len = 4, byval = t)
>>          4: c4  (typeid = 23, len = 4, byval = t)
>>          5: c5  (typeid = 23, len = 4, byval = t)
>>         ----
>> Bad Argument to Function Call("!(IsA(node,TupleTableSlot)):(null)",
File: "execnodes.c", Line: 198)
>> !(IsA(node,TupleTableSlot)) (0) [No such file or directory]
>> Abort (core dumped)

Is it not possible to do a join with 5 relations?

I'd appreciate any answer     Mike Boehlen