Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Jay Kreibich
On May 2, 2014, at 10:07 PM, Keith Medcalf wrote: > >> On May 2, 2014, at 8:54 PM, Richard Hipp wrote: > >>> I'm guessing that Mr. Abeille is upset that SQLite ... > >> ... doesn't even bother with SQL syntax and will happily accept any old >> junk as a

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Keith Medcalf
>On May 2, 2014, at 8:54 PM, Richard Hipp wrote: >> I'm guessing that Mr. Abeille is upset that SQLite ... >... doesn't even bother with SQL syntax and will happily accept any old >junk as a sorry excuse for a query. >select 1 where null; >select 1 where not null; What is

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Petite Abeille
On May 2, 2014, at 9:24 PM, Cory Nelson wrote: > quirks A peculiar behavioral habit. Idiosyncrasy, peculiarity, oddity, eccentricity, foible, whim, vagary, caprice. Indeed. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Cory Nelson
On Fri, May 2, 2014 at 2:09 PM, Petite Abeille wrote: > > On May 2, 2014, at 8:54 PM, Richard Hipp wrote: > >> I'm guessing that Mr. Abeille is upset that SQLite … > > … doesn’t even bother with SQL syntax and will happily accept any old junk as > a

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Petite Abeille
On May 2, 2014, at 8:54 PM, Richard Hipp wrote: > I'm guessing that Mr. Abeille is upset that SQLite … … doesn’t even bother with SQL syntax and will happily accept any old junk as a sorry excuse for a query. select 1 where null; select 1 where not null; When SQLite 4 sees

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Simon Slavin
On 2 May 2014, at 7:47pm, David King wrote: > Am I missing something? It's very clever for people who write programming languages to invent the idea of a boolean variable, and have 'IF' and 'WHERE' take boolean values as arguments, but I don't think it's obvious. Simon.

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Richard Hipp
On Fri, May 2, 2014 at 2:47 PM, David King wrote: > > Quick, without trying it out, what would you expect the following > statement to return: > > select 1 where 1 - 1; > > (a) one row > > (b) no row > > (c) syntax error > > For extra entertainment, try some variations: > >

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread David King
> Quick, without trying it out, what would you expect the following statement > to return: > select 1 where 1 - 1; > (a) one row > (b) no row > (c) syntax error > For extra entertainment, try some variations: > select 1 where 1; > select 1 where 0; > etc... > Bonus points for a rationalization of

[sqlite] select 1 where 1 - 1;

2014-05-02 Thread Petite Abeille
Quick, without trying it out, what would you expect the following statement to return: select 1 where 1 - 1; (a) one row (b) no row (c) syntax error For extra entertainment, try some variations: select 1 where 1; select 1 where 0; etc... Bonus points for a rationalization of any of the

[sqlite] Determining the size of the WAL/Journal file on the disk

2014-05-02 Thread Andrew Beal
Is there a way within SQLite to query the WAL/Journal file size as it currently exists on disk? F. Andrew Beal Woods Hole Oceanographic Institution 266 Woods Hole Road MS#18 Woods Hole, MA 02543 Office: 508-289-2970 Email: ab...@whoi.edu

Re: [sqlite] FTS3/4 merge function behaviour when deleting rows

2014-05-02 Thread Dan Kennedy
On 05/02/2014 07:30 PM, Stadin, Benjamin wrote: Is the delete marker also set on old keys on UPDATE? Or just DELETE -> INSERT? Internally, FTS implements an UPDATE as a DELETE followed by an INSERT. Dan. I ran into the ever-growing FTS index issue last year. I’m creating DB diffs which

Re: [sqlite] FTS3/4 merge function behaviour when deleting rows

2014-05-02 Thread Stadin, Benjamin
Is the delete marker also set on old keys on UPDATE? Or just DELETE -> INSERT? I ran into the ever-growing FTS index issue last year. I’m creating DB diffs which also contain some FTS3/4 tables. The tables get constantly updated for the checksum. The DBs were always vacuum’ed, but the growing FTS

Re: [sqlite] Bug in division?

2014-05-02 Thread Hick Gunter
BTW: The FROM clause is optional in SQLite. It is required only for expressions involving fields. SELECT 2/4 AS RESULT; Will also work, without the overhead of accessing every row of TABLE and performing DISTINCT processing and maybe even without obtaining a lock on the database.

Re: [sqlite] FTS3/4 merge function behaviour when deleting rows

2014-05-02 Thread Dan Kennedy
On 05/02/2014 04:13 PM, Andrew Moss wrote: On 2 May 2014 07:57, Dan Kennedy wrote: On 05/01/2014 03:30 PM, andrewmo wrote: We are using the FTS3 extension to sqlite to store large numbers of short (~300 byte) documents. This is working very well and providing us with

Re: [sqlite] FTS3/4 merge function behaviour when deleting rows

2014-05-02 Thread Andrew Moss
On 2 May 2014 07:57, Dan Kennedy wrote: > On 05/01/2014 03:30 PM, andrewmo wrote: > >> We are using the FTS3 extension to sqlite to store large numbers of short >> (~300 byte) documents. This is working very well and providing us with >> very >> fast text search, but the

Re: [sqlite] FTS3/4 merge function behaviour when deleting rows

2014-05-02 Thread Dan Kennedy
On 05/01/2014 03:30 PM, andrewmo wrote: We are using the FTS3 extension to sqlite to store large numbers of short (~300 byte) documents. This is working very well and providing us with very fast text search, but the behaviour around deletion of documents has me confused. Our system must control