I am connecting ArcGIS Desktop 10.2 to Postgis 2.0.3 with PostgreSQL 9.2.4. No SDE. I can load data with no problems and access the data in ArcMap. However I can't seem to use PostGIS functions within a layer definition query. For example:
ST_DWithin(location, ST_GeomFromText('POINT(-97.5 35.5)', 4326), 0.01);
Which works perfectly from PostgreSQL returns the error:
One or more layers failed to draw: Report: Failed to parse the where clause.
This is strange, as if the exact same query is used to define the underlying source query for the layer it works fine. Am I missing something here. I used to have this working for Oracle no problem. What doesn't it like about PostgreSQL's query?