This should help:
http://mapserver.org/cgi/runsub.html#default-values-if-not-provided-in-the-url
/Lars S.
Den 2017-03-14 kl. 19:38, skrev Stefanos Anastasiou:
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
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users