Hi Dan, I had some free time and looked into your request. Bear in mind I don't really know what I'm doing, but I managed to whip up this: http://paste.nachsoftware.com/SQLite3/BrksDfe9d421e8ed00d34f0fc50a59956af21byK
Results: > ./sqlite3 SQLite version 3.7.14.1 2012-10-04 19:37:12 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> SELECT "cows"; Error: no such column: cows sqlite> PRAGMA dblquoted_str_lit=1; sqlite> SELECT "cows"; cows sqlite> PRAGMA dblquoted_str_lit=0; sqlite> SELECT "cows"; Error: no such column: cows I believe this is what you wanted. I imagine the naming would be improved if this code became mainline, and the ifdefs would be handled better, but I guess this is pretty much what you wanted. Note: This changes the default behavior of SQLite. A proper patch of course would keep the default behavior. Although I couldn't figure out the pragma system enough to see how to specify what default pragma settings are. ________________________________ From: Dan Freundel <defender1...@yahoo.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Thursday, November 15, 2012 7:35 PM Subject: Re: [sqlite] Stricter parsing rules I agree as well. I tested out the original poster's patch and it works great. Any way this can be made into a "PRAGMA strict_mode" so that it would be usage-specific rather than compile-specific? I asked about this on stackoverfolw as well:http://stackoverflow.com/questions/13383763/is-there-a-way-disable-lax-quoting-rules-in-sqlite/ --- On Thu, 11/15/12, John Gabriele <jmg3...@gmail.com> wrote: From: John Gabriele <jmg3...@gmail.com> Subject: Re: [sqlite] Stricter parsing rules To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> Date: Thursday, November 15, 2012, 1:56 PM On Wed, Nov 14, 2012 at 5:22 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 14 Nov 2012, at 9:46pm, BareFeetWare <list....@barefeetware.com> wrote: > >> I agree. this tolerance by SQLite for misquoted identifiers allows a lot of >> errors. I'd really like to see the rules tightened to remove ambiguous input. > > Me three. Perhaps this and a couple of similar things will be fixed in > SQLite4. Me four. The OP's practice of always using double-quotes for identifiers seems like a sound one, and it would be useful if sqlite could tell me if the thing I *think* is an identifier is actually not. ---John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users