I am trying to use a table subquery as a distance as the float value associated with the specific index. In this way, the allowable distance changes with each array value passed as the starting node.
Using another subquery like the one th build the node array returns the error
ERROR: more than one row returned by a subquery used as an expression
which I guess i understand as the subquery I am using:
select
node,
from_v,
min(agg_cost/(2.5*60)) as agg_cost
from pgr_drivingDistance('SELECT id, source, target, cost FROM ways', (select array_agg(id) from closest_vertex), (select (10*60/2.5) - wlk_cost from closest_vertex)) pgr
group by node, from_v
order by node, agg_cost
returns a table, however it is not clear how to associate 1 table value with each starting node or if it is even possible. the wlk cost is a changing value from a starting node to the initial node on the network map, so I want the associated allowable distance in the drivingdistance function to vary to limit the travel to under the total time, in this case 10 min.
I don't know if this is possible or if I need to somehow iterate through the previous table instead of passing the start nodes as an array so I can use row values each iteration.