qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.49k stars 2.99k forks source link

Quick search behaviour in attributes tables has changed #12467

Closed qgib closed 5 years ago

qgib commented 14 years ago

Author Name: GuZzO - (GuZzO -) Original Redmine Issue: 2407

Redmine category:vectors Assignee: nobody -


When i start a search within attribute tables with Mimas (1.0.3), searches return results as if it was a SQL request -> SELECT * FROM table WHERE column like '%word_to_search%'

When i start a search within attribute tables with Enceladus (1.0.4), searches return results as if it was an exact match SQL request -> SELECT * FROM table WHERE column = 'word_to_search'

I don't know if it's referenced as bug but I prefer the previous behaviour. The new one is too rigid...

qgib commented 14 years ago

Author Name: Giovanni Manghi (@gioman)


Did you tried adding the wildcards?

qgib commented 14 years ago

Author Name: GuZzO - (GuZzO -)


I tried adding % and * before and/or after the word I searched but nothing changes.... I only got results when i search the exact word (including capitals letters)

I use [[PostGIS]] as vectors provider.

qgib commented 14 years ago

Author Name: marisn - (marisn -)


Unfortunately "Quick search" is not an "find" anymore. Wildcards are not accepted, unescaped SQL also gives errors. I.e. try to find "ab'c" ->

syntax error, unexpected Unknown_CHARACTER, expecting $end

Also it allows to inject SQL. I.e. select all records:

text' or 1=1 or COLUMN like 'text

Tested on QGIS trunk r12951M with Shapefile (DBF).

qgib commented 14 years ago

Author Name: Martin Dobias (@wonder-sk)


Fixed in c39ef3de (SVN r13180) (and escaping quotes in )