Hi, Mapfiles are very portable between operating systems, with some possible edge cases as dependencies such as the regex library may vary, or a different code path is used on Windows which may render something slightly differently, or produce different line endings. It is more likely something changed between MapServer 7 and 8 which would cause this to break, possibly the change here [1]. It does sound like a bug though if an invalid SQL statement is created, and if a test case can be created it would be good to open an issue. In any case it is best to update to the new PROCESSING 'NATIVE_FILTER=id=234' format for Mapfiles in MapServer 8.0.
Seth [1] https://github.com/MapServer/MapServer/blob/6991fd2d2b21270e9368b52526a89a0204c2399b/src/mappostgis.cpp#L2012 -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Mon, Sep 18, 2023, at 5:30 PM, Troels Arvin wrote: > Hello, > > Seth G wrote: >> Are you able to share a Mapfile? Maybe try with a cut-down version > > I found out things seem to fail due to a FILTER expression in the map > file which result in an "... AND ()" clause to be added to the SQL being > sent to the database (which is a syntax error, at least in Postgres). > > My issue seems to have to do with the change from 6 to 7 where: > > " Note Until MapServer 6, native filters could be specified as: > FILTER 'where id=234'. > But this is no longer supported." > > (From https://mapserver.org/mapfile/layer.html ) > > The odd thing is we have Windows Mapserver 7 where the map files are > still working. Mapserver would be completely similar regarding map file > rules, regardless of operating system, I'd assume. > > -- > Troels _______________________________________________ MapServer-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
