[mapserver-users] Default Values in Runtime Substitution Error
Stefanos Anastasiou
emperor_stef at yahoo.gr
Tue Mar 14 11:38:39 PDT 2017
Hi all. I'm trying to perform a runtime substitution in MapServer. My mapfile snippet is the following:
VALIDATION "val_1" "^[0-9]+(\.[0-9]+)?$" "val_2" "^[0-9]+(\.[0-9]+)?$" "val_3" "^[0-9]+(\.[0-9]+)?$" "val_4" "^[0-9]+(\.[0-9]+)?$" END METADATA #various WMS parameters END TYPE line STATUS on CONNECTIONTYPE POSTGIS CONNECTION 'host=localhost port=5432 user=stefanos password=myPassword dbname=dbName' DATA "geom FROM (SELECT * FROM stored_function(%val_1%, %val_2%, %val_3%, %val_4%)) AS foo USING UNIQUE seq USING srid=2100"
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:
Error (ERROR: syntax error at or near "%"LINE 1: ...'hex') as geom,"seq" from (SELECT * FROM _a_route(%val_1%, %val_2%... ^
It's necessary not to pass default values like "default_val_1" "some_value" because of a weird setup of my stored function.
Is there any way to fix this ?
Thanks a lot...!!
-Stefanos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170314/b4b43ff6/attachment.htm>
More information about the MapServer-users
mailing list