... LIKE 'ba_foo\_png' but this does not seem to work.
The escape mechanism for LIKE has never been implemented in SQLite. The work-around is to use GLOB if your pattern contains '_' or '%' (unfortunately, GLOB is not std SQL).
In case you're curious, the std SQL syntax is
like 'ba_foo\_png' escape '\'
Without the (unimplemented) escape clause, the '\' is just an ordinary character.
Thank you for the explanation. IMO it would be nice to have a comment about the missing ESCAPE implementation after the paragraph starting with "The LIKE operator does ..." at http://www.sqlite.org/lang.html
Thanks again, Markus