-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WFS PostGIS: malformed SQL query with PropertyIsEqualTo on a Date column #5265
Comments
edigiacomo
pushed a commit
to edigiacomo/mapserver
that referenced
this issue
Mar 25, 2016
In PostGIS filter, when there's a MS_TOKEN_LITERAL_TIME right after MS_TOKEN_LITERAL_TIME, the first is ignored, because the right operator ("between") is set with the MS_TOKEN_LITERAL_TIME.
Studying the code, I noticed that the SQL is buggy with a
But with a
Maybe the issue could be related to a more generic scenario when a |
edigiacomo
pushed a commit
to edigiacomo/mapserver
that referenced
this issue
Mar 25, 2016
In PostGIS filter, a MS_TOKEN_COMPARISON_EQ followed by a MS_TOKEN_LITERAL_TIME is ignored, because the operator if set with the MS_TOKEN_LITERAL_TIME.
Hi @edigiacomo, thanks for the patch! I'll review ASAP (been gone on spring break)... --Steve |
sdlime
added a commit
that referenced
this issue
Jun 17, 2016
Fix filter of MS_TOKEN_LITERAL_TIME in PostGIS (#5265)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I have a PostGIS database with a table containing a Date column.
Using MapServer 7.0.1, a WFS GetFeature using PropertyIsEqualTo on the date column results in a malformed SQL query:
The query doesn't fail with
PropertyIsGreaterThan
orPropertyIsLessThan
.The problem is the
= between
in the SQL query (https://github.com/mapserver/mapserver/blob/branch-7-0/mappostgis.c#L3392). The functions related toPropertyIsGreaterThan
orPropertyIsLessThan
, don't fail because they don't append an operator, but only the value to ther SQL query (https://github.com/mapserver/mapserver/blob/branch-7-0/mappostgis.c#L3428 and https://github.com/mapserver/mapserver/blob/branch-7-0/mappostgis.c#L3480).A solution could be to remove the
=
before, but I don't know the code well enough to write a PR.MapServer version:
Here the mapfile:
The text was updated successfully, but these errors were encountered: