Re: [sqlite] Pragma to flag unknown pragma?

2016-11-25 Thread Roger Binns
On 22/11/16 16:08, Scott Hess wrote: > Something like "PRAGMA pedantic_pragma = on" would be much slicker. SQLite lets you do "natrual" joins too. I'd argue all this falls under a lint mode that helps conscientious developers make sure everything is working correctly under the hood.

Re: [sqlite] Pragma to flag unknown pragma?

2016-11-23 Thread James K. Lowden
On Tue, 22 Nov 2016 16:08:49 -0800 Scott Hess wrote: > One could perhaps fake pedantic pragma with SQLITE_FCNTL_PRAGMA in a > custom VFS, but that seems a little excessive for something like this. > Something like "PRAGMA pedantic_pragma = on" would be much slicker. You might

Re: [sqlite] Pragma to flag unknown pragma?

2016-11-23 Thread Paul Sanderson
Most pragmas allow you to issue them in a mode such as to query a current state. So to use your example pragma journal_mode = persist; followed by pragma journal_mode; with a subsequent check to see that the returned value is set to what you want it to be set to (actually the new value is

Re: [sqlite] Pragma to flag unknown pragma?

2016-11-23 Thread Scott Hess
On Tue, Nov 22, 2016 at 10:50 PM, R Smith wrote: > On 2016/11/23 2:08 AM, Scott Hess wrote: >> https://www.sqlite.org/pragma.html has: >> "No error messages are generated if an unknown pragma is issued. >> Unknown pragmas are simply ignored. This means if there is a typo in a

Re: [sqlite] Pragma to flag unknown pragma?

2016-11-22 Thread R Smith
On 2016/11/23 2:08 AM, Scott Hess wrote: https://www.sqlite.org/pragma.html has: "No error messages are generated if an unknown pragma is issued. Unknown pragmas are simply ignored. This means if there is a typo in a pragma statement the library does not inform the user of the fact." I just