<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px"><div id="yui_3_16_0_ym19_1_1484527718894_2859">Hello list,</div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">   I have a function stored in PostGIS in 'sql' language that performs pgRouting and returns the geometry of my road network as well. In the DATA section of the layer that renders this geometry, it is as follows:</div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">   DATA "geom FROM (SELECT * FROM routing_function(%source%, %target%)) AS foo USING UNIQUE seq using srid=2100"</div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">My VALIDATION section is in the layer level as:</div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">     VALIDATION </div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_4942">            "source" "^[0-9]+$"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_4943">            "target" "^[0-9]+$"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_4944">       END</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_4944"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_4944">But the results are a bit weird...</div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">In map mode:  if I pass the parameters in the url like ..&source=100&target=1000  I get a static map with my route correctly. </div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">In WMS request (as SERVICE=WMS&....&source=100&target=1000): it works fine as well returning a static image with the route.</div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">In browse mode:  the first time invoked the result is fine returning the route along with my template. But with the route already calculated, if I click on pan or zoom in for example, I get the following error in the MS_ERRORFILE: </div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1484527718894_2859" dir="ltr">Error (ERROR:  syntax error at or near "%"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_6842">LINE 1: ...hex') as geom,"seq" from (SELECT * FROM routing_function(%source%, ...</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_6842"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_6842">The same occurs also if I use the OpenLayers template like  ...&template=openlayers=&source=100&target=1000.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_6842"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_6842">What am I missing here ?</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_6842"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484527718894_6842">Thank you very much.</div></div></body></html>