Re: [sqlite] When is the decltype recognized?

2014-02-12 Thread Peter Otten
Clemens Ladisch wrote: > Peter Otten wrote: >> select * from (select alpha from demo union all select alpha from demo) >> order by alpha decltype: (null) >> >> select * from (select alpha from demo union all select alpha from demo) >> decltype: custom >> >> Even taking

[sqlite] System.Data.SQLite version 1.0.91.0 released

2014-02-12 Thread Joe Mistachkin
System.Data.SQLite version 1.0.91.0 (with SQLite 3.8.3.1) is now available on the System.Data.SQLite website: http://system.data.sqlite.org/ Further information about this release can be seen at http://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the

Re: [sqlite] help needed for major SQLite problem

2014-02-12 Thread Stephen Chrzanowski
Information on how to open SQLite files: http://www.sqlite.org/c3ref/open.html How the locking mechanisms work: http://sqlite.org/lockingv3.html Specifically, it'll depend on the language or wrapper you're using to access the database. In my case (Delphi) there is an option in the open function

Re: [sqlite] How to minimize fsync'ed writes to flash for storing periodically measured data?

2014-02-12 Thread Stephen Chrzanowski
If you write your information to the cheap* USB key instead of the SD card, from a mile-high view, you're looking at a bad data disk instead of a bad OS disk. You could backup daily your USB version of the database to the SD card, or to a network drive (If available) so then you're only writing

Re: [sqlite] documentation for datetime functions

2014-02-12 Thread Richard Hipp
On Wed, Feb 12, 2014 at 2:56 PM, Igor Tandetnik wrote: > On 2/12/2014 2:31 PM, Bernd wrote: > >> but I think that 2013-10-07 08:23:19.120-04:00 ought to be >> 2013-10-07 04:23:19.120-04:00 >> > > That's what I see right now. Perhaps the page has already been corrected. >

[sqlite] sqlite3.exe: incomplete CSV import

2014-02-12 Thread Christoph Appel
Hello, when importing a .csv file which contains less columns than specified in the corresponding TABLE's schema, sqlite3.exe does not import the last column. Attached You can find a simple test case: # data.csv: a,b d,e SQLite version 3.8.3.1 2014-02-11 14:52:19

Re: [sqlite] documentation for datetime functions

2014-02-12 Thread Igor Tandetnik
On 2/12/2014 2:31 PM, Bernd wrote: but I think that 2013-10-07 08:23:19.120-04:00 ought to be 2013-10-07 04:23:19.120-04:00 That's what I see right now. Perhaps the page has already been corrected. -- Igor Tandetnik ___ sqlite-users mailing list

[sqlite] documentation for datetime functions

2014-02-12 Thread Bernd
I think there is a small mistake in https://sqlite.org/lang_datefunc.html. It says that the following time strings are equivalent 2013-10-07 08:23:19.120 2013-10-07T08:23:19.120Z 2013-10-07 08:23:19.120-04:00 2456572.84952685 but I think that 2013-10-07 08:23:19.120-04:00 ought to be 2013-10-07

Re: [sqlite] help needed for major SQLite problem

2014-02-12 Thread C M
On Mon, Feb 10, 2014 at 4:40 PM, Stephen Chrzanowski wrote: > Personally, I don't buy that DropBox is the culprit as I've done this kind > of thing a few times in a few applications of my own, however, I'm the > single user that works on that single account, and any app that

Re: [sqlite] database table is locked issue

2014-02-12 Thread Simon Slavin
On 12 Feb 2014, at 4:44pm, Sandu Buraga wrote: > I have a process with several threads working in the same time on a > database file. I have 0 or 1 writers and 0 or N readers at a moment. All > write accesses are isolated in transactions, I am using WAL and shared >

[sqlite] database table is locked issue

2014-02-12 Thread Sandu Buraga
Hi, I have a process with several threads working in the same time on a database file. I have 0 or 1 writers and 0 or N readers at a moment. All write accesses are isolated in transactions, I am using WAL and shared cache, but sometimes during the DELETE statemens I get "database table is locked"

Re: [sqlite] When is the decltype recognized?

2014-02-12 Thread Clemens Ladisch
Peter Otten wrote: > select * from (select alpha from demo union all select alpha from demo) order > by alpha > decltype: (null) > > select * from (select alpha from demo union all select alpha from demo) > decltype: custom > > Even taking http://sqlite.org/c3ref/column_decltype.html > """ > If

Re: [sqlite] Bug in SQLite 3.8.2

2014-02-12 Thread Richard Hipp
Thanks for the bug report. Ticket: http://www.sqlite.org/src/info/c34d0557f740c45070 Fixed here: http://www.sqlite.org/src/info/5d01426ddf On Wed, Feb 12, 2014 at 5:31 AM, Paweł Salawa wrote: > Hi, > > The bug affects 3.8.2 and 3.8.3.1, I haven't tested other versions.

Re: [sqlite] How to minimize fsync'ed writes to flash for storing periodically measured data?

2014-02-12 Thread Clemens Eisserer
Hi Stephen, > *First*, buy a bulk amount of cheap, inexpensive USB keys and start > throwing your data at the key instead of your OS's card. Don't see how that will change things: Once the SD card fails, data logging will fail too - same is true for the usb key. > *Second*, instead of writing

[sqlite] When is the decltype recognized?

2014-02-12 Thread Peter Otten
Hello! Over at python.org there is a bug report that its sqlite3 module sometimes doesn't correctly deserialize a typed column. From my limited understanding it boils down to the following once you go down to sqlite's C API: #include #include "sqlite3.h" int main(int argc, char **argv) {

Re: [sqlite] Bug in SQLite 3.8.2

2014-02-12 Thread Kees Nuyt
On Wed, 12 Feb 2014 11:31:05 +0100, Pawe? Salawa wrote: > - open database A and attach database B: > ATTACH 'database_b.db' AS 'attached'; This is not the main cause, but that should be: ATTACH 'database_b.db' AS attached; (attached should not be a literal but

Re: [sqlite] How to minimize fsync'ed writes to flash for storing periodically measured data?

2014-02-12 Thread Stephen Chrzanowski
There are a few reasons for the two-database method would be useful versus a single database connection, depending on the volume of data in the pot. 1> Having a single hourly database will keep the database size minimal. ~8000 entries holding just temperature data, it'll be small so I can't see a

Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Attila
Dan provided the solution. Thanks! --- It's because by default the "[" character is treated as a punctuation or separator character and ignored. As a result the FTS query "[*" is equivalent to "" - which always returns zero rows. You can change the set of characters treated a punctuation by

[sqlite] Bug in SQLite 3.8.2

2014-02-12 Thread Paweł Salawa
Hi, The bug affects 3.8.2 and 3.8.3.1, I haven't tested other versions. *Preconditions:* - 2 databases: A and B. - database A has table "test": CREATE TABLE test (id integer PRIMARY KEY, val text) WITHOUT ROWID - database B has table "test2": CREATE TABLE test2 (EID INTEGER, node1 INTEGER,

Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Richard Hipp
On Wed, Feb 12, 2014 at 4:57 AM, Attila wrote: > I tried that one as well. > SQLite has no built-in MATCH function. If you want to use the MATCH syntax, then you need to register your own MATCH function using sqlite3_create_function(). -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Attila
I tried that one as well. On 2014-02-12 10:26, Hick Gunter wrote: Maybe you should be using single quotes as string delimiters? -Ursprüngliche Nachricht- Von: Attila [mailto:dex...@xyzones.org] Gesendet: Mittwoch, 12. Februar 2014 10:18 An: sqlite-users@sqlite.org Betreff: [sqlite]

Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Richard Hipp
On Wed, Feb 12, 2014 at 4:17 AM, Attila wrote: > Hello, > > Based on http://www.sqlite.org/lang_expr.html#match first diagram i would > expect that MATCH "\[*" ESCAPE "\" to work. Actually it return Error: wrong > number of arguments to function MATCH() > > Could you please

Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Hick Gunter
Maybe you should be using single quotes as string delimiters? -Ursprüngliche Nachricht- Von: Attila [mailto:dex...@xyzones.org] Gesendet: Mittwoch, 12. Februar 2014 10:18 An: sqlite-users@sqlite.org Betreff: [sqlite] MATCH and ESCAPE Hello, Based on

[sqlite] MATCH and ESCAPE

2014-02-12 Thread Attila
Hello, Based on http://www.sqlite.org/lang_expr.html#match first diagram i would expect that MATCH "\[*" ESCAPE "\" to work. Actually it return Error: wrong number of arguments to function MATCH() Could you please advise? Thanks, Attila -- Attila @xyzones

Re: [sqlite] How to minimize fsync'ed writes to flash for storing periodically measured data?

2014-02-12 Thread RSmith
On 2014/02/12 10:09, Stephen Chrzanowski wrote: The other thing I'd look into is that because of the varying speeds of SD, the volume of information you could be writing, you may run into an issue where you call the backup API but due to write speeds, something else writes to the live in-memory

Re: [sqlite] How to minimize fsync'ed writes to flash for storing periodically measured data?

2014-02-12 Thread Stephen Chrzanowski
Three thoughts; *First*, buy a bulk amount of cheap, inexpensive USB keys and start throwing your data at the key instead of your OS's card. I'm not 100% clear on how a USB key handles itself as far as writing to certain parts of its memory, but you could partition off chunks of space and just