<div dir="ltr"><div><br></div><div>In version 1.X of GDAL, the following was accepted and worked:</div><div><br></div><div>std::string query = "LOCATION=\"some text\"";</div><div>OGR_L_SetAttributeFilter(layer, query.c_str());</div><div><br></div><div>In version 2.X, this is no longer accepted and the double quotes must be replaced by single quotes:</div><div><br></div><div><div>std::string query = "LOCATION='some text'";</div><div>OGR_L_SetAttributeFilter(layer, query.c_str());</div><div><br></div><div>This wouldn't be awful, but the error that occurs tells you nothing about the actual problem.  It yields:</div><div><br></div><div>"some text" not recognised as an available field.</div><div><br></div><div>Perhaps it should give a parsing error?  In 1.11, parsing the query with double quotes would yield an SNT_OPERATION node with subnodes SNT_COLUMN and SNT_CONSTANT.  In 2.0, the same query yields an SNT_OPERATION with two SNT_COLUMN subnodes, which seems to cause the confusing error.</div><div><br></div><div>Should the parser accept column values with double quotes?  If not, can it provide better feedback?</div><div><br></div>-- <br><div class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>
</div></div>