I try to run a recursive query to get shortest paths where the id should occure once in a path at most. The view I am using looks like:
pkp_symmetric(
personknows numeric(20,0),
personisknown numeric(20,0),
creation timestamp)
When running
with recursive temp(persStart, persNext, pfad, tiefe, pcycle )
as
(select pkp.personknows, pkp.personIsKnown, array[pkp.personKnows], 1, false
from pkp_symmetric pkp--pidstart, pidstart, pidstart
union all
select p.personknows, p.personisknown, t.pfad|| t.persNext, t.tiefe + 1, p.personknows = ANY(t.pfad)
from pkp_symmetric p join temp t
on p.personknows = t.persNext where not pcycle )
select * from temp t
I get the following error:
SQL Error [42804]: ERROR: recursive query "temp" column 3 has type numeric(20,0)[] in non-recursive term but type numeric[] overall
Hinweis: Cast the output of the non-recursive term to the correct type.
Position: 119
SQL Error [42804]: ERROR: recursive query "temp" column 3 has type numeric(20,0)[] in non-recursive term but type numeric[] overall
Hinweis: Cast the output of the non-recursive term to the correct type.
Position: 119
SQL Error [42804]: ERROR: recursive query "temp" column 3 has type numeric(20,0)[] in non-recursive term but type numeric[] overall
Hinweis: Cast the output of the non-recursive term to the correct type.
Position: 119
SQL Error [42804]: ERROR: recursive query "temp" column 3 has type numeric(20,0)[] in non-recursive term but type numeric[] overall
Hinweis: Cast the output of the non-recursive term to the correct type.
Position: 119
ERROR: recursive query "temp" column 3 has type numeric(20,0)[] in non-recursive term but type numeric[] overall
Hinweis: Cast the output of the non-recursive term to the correct type.
Position: 119
ERROR: recursive query "temp" column 3 has type numeric(20,0)[] in non-recursive term but type numeric[] overall
Hinweis: Cast the output of the non-recursive term to the correct type.
Position: 119
I would appreciate to get some help. Best regards.