Skip to content
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

IN operator is not working with PostGIS expression translation #5490

Closed
sdlime opened this Issue Oct 13, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@sdlime
Copy link
Member

sdlime commented Oct 13, 2017

MapServer expressions with the IN operator are not being translated to native SQL for PostGIS. Should verify that other drivers aren't suffering from the same oversight.

This primarily affects attribute queries where expressions must be given as MapServer expressions. Filters are also affected but there are a couple of workarounds in that case:

  1. use the NATIVE_FILTER processing key
  2. put the SQL directly in the DATA statement

--Steve

@sdlime sdlime added this to the 7.2 Release milestone Oct 13, 2017

@sdlime sdlime self-assigned this Oct 13, 2017

@ejn

This comment has been minimized.

Copy link
Contributor

ejn commented Oct 16, 2018

Just run into this problem too - FILTER ('[attr]' IN 'my,list,of,items') gets translated to "attr"::text'my,list,of,items'

@sdlime, have you made progress on this? Since it has now missed the 7.2 release, would it be worth putting a warning in the documentation until it gets fixed in a release?

@sdlime

This comment has been minimized.

Copy link
Member Author

sdlime commented Nov 5, 2018

Am working on a fix now - in the 7.0 branch... Trick is handling both string and numeric lists.

sdlime added a commit to sdlime/mapserver that referenced this issue Nov 5, 2018

sdlime added a commit to sdlime/mapserver that referenced this issue Nov 7, 2018

sdlime added a commit that referenced this issue Nov 8, 2018

@sdlime

This comment has been minimized.

Copy link
Member Author

sdlime commented Nov 8, 2018

The fix has been added into the 7.2 branch, feel free to give it a try and let me know if you run into issues. I've added some regression tests and it seems to work fine. Closing... --Steve

@sdlime sdlime closed this Nov 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.