Re: [sqlite] proposal: make the archive option -Au to update only newer files. /Patch included/

2019-03-21 Thread Захар Малиновский
Yes, timestamps only. Sqlar does not has a column for checksum or sha. Here comes the patch: Index: src/shell.c.in == --- src/shell.c.in +++ src/shell.c.in @@ -5820,10 +5820,30 @@ " mtime,\n" " data\n" " FROM

[sqlite] DATA RACE on sqlite3GlobalConfig.isInit

2019-03-21 Thread Плотников Павел
Hello, The race relates to the usage of sqlite3GlobalConfig.isInit variable within the sqlite3_initialize routine. As for 3.27.2 source code, the lines to be highlighted are sqlite3.c:153852: if( sqlite3GlobalConfig.isInit ) return SQLITE_OK; and sqlite3.c:153938: sqlite3GlobalConfig.isInit =

Re: [sqlite] filling a key/value table

2019-03-21 Thread Igor Tandetnik
On 3/21/2019 12:04 PM, Hick Gunter wrote: I have an external data store that is accessible to sqlite as a virtual table. The equivalent SQL declaration is similar to: CREATE TABLE logfile (timestamp INTEGER, type INTEGER, name TEXT, size INTEGER, ...); I would like to create an index as a

[sqlite] filling a key/value table

2019-03-21 Thread Hick Gunter
I have an external data store that is accessible to sqlite as a virtual table. The equivalent SQL declaration is similar to: CREATE TABLE logfile (timestamp INTEGER, type INTEGER, name TEXT, size INTEGER, ...); I would like to create an index as a native SQLite table declared like: CREATE

Re: [sqlite] filling a key/value table

2019-03-21 Thread Simon Slavin
On 21 Mar 2019, at 4:04pm, Hick Gunter wrote: > CREATE TABLE logidx( keyid INTEGER, value BLOB, timestamp INTEGER, primary > key (keyid, value, location) ) WITHOUT ROWID; Can't answer the question you posed and I'm happy to see Igor could. But I wanted to speak against including a BLOB field

Re: [sqlite] filling a key/value table

2019-03-21 Thread Clemens Ladisch
Simon Slavin wrote: > I wanted to speak against including a BLOB field in a compound PRIMARY KEY. That depends on the size of the blob. If it contains 'normal'-sized values, it's just as efficient as other types. Regards, Clemens ___ sqlite-users

Re: [sqlite] Improving CSV import

2019-03-21 Thread Shawn Wagner
I thought about suggesting that, but I can see it breaking backwards compatibility with existing scripts. I set .header on in my ~/.sqliterc for example, and have things that don't change it before importing csv files and would thus miss a row. (I also have a handy perl script that does all this

Re: [sqlite] Improving CSV import

2019-03-21 Thread D Burgess
Agree with all that. > A way to skip a header row when the table exists would be useful. > How about > .header on/off ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Improving CSV import

2019-03-21 Thread Roger Schlueter
Or, better yet .header n where n=0   <--no header n>0  <-- number of header lines If .header is not specified then it defaults to zero so breaking backwards is not a concern. On 3/21/2019 19:04, Shawn Wagner wrote: I thought about suggesting that, but I can see it breaking backwards

Re: [sqlite] DATA RACE on sqlite3GlobalConfig.isInit

2019-03-21 Thread Richard Damon
On 3/21/19 7:43 AM, Плотников Павел wrote: > Hello, > > The race relates to the usage of sqlite3GlobalConfig.isInit variable within > the sqlite3_initialize routine. > > As for 3.27.2 source code, the lines to be highlighted are > > sqlite3.c:153852: if( sqlite3GlobalConfig.isInit ) return

[sqlite] Improving CSV import

2019-03-21 Thread Shawn Wagner
Importing a CSV file in the command line shell has two different behaviors: if the table to import to doesn't exist, treat the first row of the file as a header with column names to use when creating the table. If the table does exist, treat all rows as data. A way to skip a header row when the