<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_1489503002035_26426">Hi all.</div><div id="yui_3_16_0_ym19_1_1489503002035_26426" dir="ltr"> I'm trying to perform a runtime substitution in MapServer. My mapfile snippet is the following: </div><div id="yui_3_16_0_ym19_1_1489503002035_26426" dir="ltr"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26578"> VALIDATION </div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26590"> "val_1" "^[0-9]+(\.[0-9]+)?$" </div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26591"> "val_2" "^[0-9]+(\.[0-9]+)?$"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26592"> "val_3" "^[0-9]+(\.[0-9]+)?$"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26593"> "val_4" "^[0-9]+(\.[0-9]+)?$"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26598"> END</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26599"> METADATA</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26600"> #various WMS parameters</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26607"> END</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26608"> TYPE line</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26609"> STATUS on</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26610"> CONNECTIONTYPE POSTGIS</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26611"> CONNECTION 'host=localhost port=5432 user=stefanos password=myPassword dbname=dbName' </div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26613"> DATA "geom FROM (SELECT * FROM stored_function(%val_1%, %val_2%, %val_3%, %val_4%)) AS foo USING UNIQUE seq USING srid=2100"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26613"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26613"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26613">If I pass the parameters in my url, everything works well. The problem occurs when I don't pass any parameter. The MS_ERROFILE gives me the following error:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26613"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26776">Error (ERROR: syntax error at or near "%"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26777">LINE 1: ...'hex') as geom,"seq" from (SELECT * FROM _a_route(%val_1%, %val_2%...</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778"> ^</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778">It's necessary not to pass default values like "default_val_1" "some_value" because of a weird setup of my stored function.<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778">Is there any way to fix this ? </div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778">Thanks a lot...!!</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26778">-Stefanos</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26613"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489503002035_26613"><br></div></div></body></html>