I'm facing a quote problem on a pgrouting query.
What I'm thinking is wrong is that my query only works if I use one, then four, then eight quotes on encapsulated queries.
Is there a way to simplify this ?
SELECT * FROM pgr_pointsaspolygon( 'SELECT id::int4, st_x(ways_vertices_pgr.the_geom) as x, st_y(ways_vertices_pgr.the_geom) as y FROM pgr_drivingDistance( ''''SELECT gid as id, source, target, ST_Length_Spheroid(the_geom, ''''''''SPHEROID["WGS 84",6378137,298.257223563]'''''''') as cost FROM ways'''', 7, 550, false, false) INNER JOIN ways_vertices_pgr on (ways_vertices_pgr.id = id2)');
Thanks in advance