Re: [sqlite] Compiling spellfix for sqlite3

2017-08-26 Thread curmudgeon
Thanks for those explanations Keith and Richard. I always thought the <> were the ones supplied by the language. -- View this message in context: http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97122.html Sent from the SQLite mailing list archive at Nabble.com.

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-26 Thread Bart Smissaert
> So I think somehow your compiler is not actually updating what you are running, or that you are not running what you think you are compiling ... Yes, that seems the case, but can't see it. Will just double check everything. RBS On Fri, Aug 25, 2017 at 10:31 PM, Keith Medcalf

[sqlite] Bug + Enhancement ideas

2017-08-26 Thread Andrew Paullin
Hello SQLite Team, Thank you very much for such a great product. Here are a few Enhancement ideas: On page: https://sqlite.org/cli.html in section 10, idea to add: sqlite3 db_good.db < corrupt_db_export.sql as an example of how to restore a database. Also perhaps mention about how this

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-26 Thread Bart Smissaert
Fixed this now. Problem was that in the same folder as the MSVS .vcxproj file there was an old amalgation file. Somehow this must have been used although in MSVS the right sqlite3.c file (3.20.1) was loaded and this new file seemed to be part of the project. Fixed it by putting that 3.20.1

Re: [sqlite] Bug + Enhancement ideas

2017-08-26 Thread Andrew Paullin
oh, and also perhaps a ".import" command would be a good compliment to ".dump". Just an idea... On Fri, Aug 25, 2017 at 11:02 PM, Andrew Paullin wrote: > Hello SQLite Team, > > Thank you very much for such a great product. > > Here are a few Enhancement ideas: > > On

Re: [sqlite] Bug + Enhancement ideas

2017-08-26 Thread Keith Medcalf
you can use .read to read the .dump file. .read reads a file containing SQL statements and executes them .import import data from a CSV file into table Since .dump writes the output as an executable SQL script, the opposite function is performed by .read --- The fact that there's a

[sqlite] sqlite3_column_text() return value

2017-08-26 Thread Igor Korot
Hi, Is there a reason why the aforementioned function returns "const unsigned char *" instead of just "const char *"? Will I miss anything if I cast out "unsigned"? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] sqlite3_column_text() return value

2017-08-26 Thread Richard Hipp
On 8/26/17, Igor Korot wrote: > Hi, > Is there a reason why the aforementioned function returns "const unsigned > char *" instead of just "const char *"? This is due to some bad planning that occurred about 15 years ago, but which must be carried forward to preserve 100% API

[sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
Looking at the results of sqlite3_column_count (1) and also sqlite3_column_name (optimize) it seems that pragma optimize can have an output. What would that output be and what would be a way to show such ouput? Using the latest 3.20.1 RBS ___

Re: [sqlite] sqlite3_column_text() return value

2017-08-26 Thread Igor Korot
Richard, On Sat, Aug 26, 2017 at 2:19 PM, Richard Hipp wrote: > On 8/26/17, Igor Korot wrote: >> Hi, >> Is there a reason why the aforementioned function returns "const unsigned >> char *" instead of just "const char *"? > > This is due to some bad planning

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
I looked at my application code and that seems OK, but the output is a single null value. What kind of output should I get? RBS On Sat, Aug 26, 2017 at 10:05 PM, Richard Hipp wrote: > On 8/26/17, Bart Smissaert wrote: > > Thanks, tried that but no

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Simon Slavin
On 26 Aug 2017, at 10:58pm, Bart Smissaert wrote: > I looked at my application code and that seems OK, but the output is a > single null value. > What kind of output should I get? That’s just SQLite returning SQLITE_OK because the command ran without problems. You

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
> SELECT * FROM PRAGMA optimize(1); That doesn't prepare, error at ( RBS On Sat, Aug 26, 2017 at 11:03 PM, Simon Slavin wrote: > > > On 26 Aug 2017, at 10:58pm, Bart Smissaert > wrote: > > > I looked at my application code and that seems OK,

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Keith Medcalf
select * from pragma_optimize(1); the table format of all pragmas is to prepend pragma_ to the pragma name. select * from pragma_function_list; select * from pragma_cache_size; etc etc. https://sqlite.org/pragma.html --- The fact that there's a Highway to Hell but only a Stairway to Heaven

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Clemens Ladisch
Bart Smissaert wrote: > Looking at the results of sqlite3_column_count (1) and also > sqlite3_column_name (optimize) it > seems that pragma optimize can have an output. What would that output be > and what would be a way to show such ouput?

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
OK, thanks, I got it. What would be a way to show this output? I created a large table with no indexes, but no output. Then added an index but no analyse, but no output. RBS On Sat, Aug 26, 2017 at 9:16 PM, Clemens Ladisch wrote: > Bart Smissaert wrote: > > Looking at the

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
Tried that but no output. Will check my application code, my guess it doesn't handle this statement well. RBS On Sat, Aug 26, 2017 at 10:05 PM, Richard Hipp wrote: > On 8/26/17, Bart Smissaert wrote: > > Thanks, tried that but no output. > > Should I

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Richard Hipp
On 8/26/17, Bart Smissaert wrote: > OK, thanks, I got it. > What would be a way to show this output? > I created a large table with no indexes, but no output. Then added an index > but no analyse, but no output. Create two indexes on the table. Then run some query that

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
Thanks, tried that but no output. Should I run: pragma optimize(1) ? RBS On Sat, Aug 26, 2017 at 9:54 PM, Richard Hipp wrote: > On 8/26/17, Bart Smissaert wrote: > > OK, thanks, I got it. > > What would be a way to show this output? > > I created a

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Richard Hipp
On 8/26/17, Bart Smissaert wrote: > Thanks, tried that but no output. > Should I run: pragma optimize(1) ? Yes. Except that now that ANALYZE has been run, it wouldn't do anything. DROP the sqlite_stat1 table, then run the query again, then run "PRAGMA optimize(1)".

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
This is interesting: Some pragmas take effect during the SQL compilation stage, not the execution stage. This means if using the C-language sqlite3_prepare() , sqlite3_step() , sqlite3_finalize()

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Simon Slavin
On 27 Aug 2017, at 12:29am, Bart Smissaert wrote: > When does the optimize pragma take effect? It analyzes data not available until you’re running your program. So it can’t be prepared during compilation. Simon. ___

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Richard Hipp
On 8/26/17, Bart Smissaert wrote: > I looked at my application code and that seems OK, but the output is a > single null value. > What kind of output should I get? The following script shows you what to expect: CREATE TABLE t1(a INTEGER PRIMARY KEY,b,c); CREATE INDEX

Re: [sqlite] Output of pragma optimize?

2017-08-26 Thread Bart Smissaert
Thanks, now it works! I get: optimize --- ANALYZE "main"."t1" RBS On Sun, Aug 27, 2017 at 12:48 AM, Richard Hipp wrote: > On 8/26/17, Bart Smissaert wrote: > > I looked at my application code and that seems OK, but the output is a > >

[sqlite] My 1st C++ SQLite3 program

2017-08-26 Thread Papa
class SQLite3_RDB {     private:     sqlite3* db; //!< Data Base     std::string database_name;    public:     SQLite3_RDB();     ~SQLite3_RDB(){sqlite3_close(db); } }; SQLite3_RDB::SQLite3_RDB(){     databese_name.assign("information.sql3db");     rc =

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-26 Thread Igor Korot
Hi, On Sat, Aug 26, 2017 at 9:34 PM, Papa wrote: > class SQLite3_RDB { > private: > sqlite3* db; //!< Data Base > std::string database_name; >public: > SQLite3_RDB(); > ~SQLite3_RDB(){sqlite3_close(db); } > }; >

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-26 Thread Simon Slavin
On 27 Aug 2017, at 2:34am, Papa wrote: > Why do I get this error message? Try having the program using file calls to open a simple text file in the same directory. Does that succeed ? Simon. ___ sqlite-users mailing list