Understanding a complex query in pgrouting
Posted: Sat Sep 05, 2015 12:26 pm
I am new to pgrouting and basically am familier with sql and postgresql, i came across the following command below:
I am used to seeing sql statements as below:
But i am thrown off the hook when i see something like:
What's with the
part ?
Also is the below a subquery ?? and can somebody explain it ? I am not very clear with the below query.
Thank you.
got the above query from here http://workshop.pgrouting.org/chapters/ ... h-dijkstra
Code: Select all
SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_dijkstra('
SELECT gid AS id,
source::integer,
target::integer,
length::double precision AS cost
FROM ways',
30, 60, false, false);Code: Select all
SELECT param1 , param2
Code: Select all
SELECT seq, id1 AS node, id2 AS edge
Code: Select all
ASpart ?
Also is the below a subquery ?? and can somebody explain it ? I am not very clear with the below query.
Code: Select all
(' SELECT gid AS id,
source::integer,
target::integer,
length::double precision AS cost
FROM ways',
30, 60, false, false);
got the above query from here http://workshop.pgrouting.org/chapters/ ... h-dijkstra