Hi Puneet,

Would a scripting language, like Pl/Pgsql, be something to tackle your problem? It lets you build dynamic commands: http://www.postgresql.org/docs/8.4/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN.

I have also used PHP to build dynamic SQL queries, but I don't know if you can use that in your environment. I access those PHP-scripts in QGis by writing out the mapping results as WMS services (http://mapserver.org/ogc/mapscript.html).

You could also try Pl/Python from within Postgresql (http://www.postgresql.org/docs/8.4/interactive/plpython.html)l. I've never used it, but it's syntactically certainly more flexible than Pl/Pgsql. Or even Pl/Perl, if your inclinations lie in that direction :-)

Jan

On 07/06/10 06:39, P Kishor wrote:
This started of as a QGIS question, but I am finding it impossible to
register for the QGIS forums, so I am asking on the MapServer list, as
this is going to evolve into a MapServer question as well.

I want to query a PostGIS db with arbitrary queries -- views that join
spatial and non-spatial tables. However, the permutations of these
queries are too many to predefine them as views. As far as I can tell,
QGIS does not allow me to create views/queries on the fly. It can only
connect to an already defined view, which I can then further filter,
but it can't actually let me create a view.

So, what is the best way to go about doing this with MapServer? Oh,
and if someone could kindly shed light on QGIS's capabilities in this
regard, well, that would be gravy.

Many thanks,

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to