Re: [sqlite] Grouping and grabbing one item

2017-10-19 Thread Clemens Ladisch
no...@null.net wrote: > On Wed Oct 18, 2017 at 07:57:24PM +0200, Darko Volaric wrote: >> select (SELECT ed from Tasks where task = 'QUOTE' and Pid = 1), >> max(ed),target, sum(amt) from Tasks where Pid=1 group by target >> HAVING amt > 0; > > When I first read that query I wondered if putting a

[sqlite] Wrong Column Name in "create table as select"

2017-10-19 Thread Thomas Rohwer
Hello, with SQLite 3.20.1 2017-08-24 16:21:36 8d3a7ea6c5690d6b7c3767558f4f01b511c55463e3f9e64506801fe9b74dce34 I am observing the following: sqlite> create table q as select service from (select v as service from (select 1 as v)); sqlite> .schema CREATE TABLE q(v); I would expect the column

Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Well, now I have troubles loading this extension. I've built another one before, fts5stemmer. When using the CLI sqlite3 (version 3.20.1 from MacPorts): ❯ sqlite3 SQLite version 3.20.1 2017-08-24 16:21:36 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open

Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Thanks a lot Dan, that worked! I'm fine with the trunk version for now but hope to see this in stable eventually as I'll have to later build this extension for various platforms for the release of my app. Thanks again for the quick fix On Wed, Oct 18, 2017 at 6:06 PM Dan Kennedy

[sqlite] [BUG] shell: .import: no special characters in table name

2017-10-19 Thread Clemens Ladisch
Hi, the .import command does not work (and can show misleading error messages) if the table name contains special characters: sqlite> .import test.csv temp.t Error: no such table: temp.t sqlite> select * from temp.t; sqlite> This appears to be caused by inconsistent quoting of the table

Re: [sqlite] [BUG] shell: .import: no special characters in table name

2017-10-19 Thread Simon Slavin
On 19 Oct 2017, at 7:38pm, Clemens Ladisch wrote: > the .import command does not work (and can show misleading error messages) > if the table name contains special characters: > > sqlite> .import test.csv temp.t What format is the file "temp.t" in ? UTF-8 ? ASCII ?

Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Hm, I think that's because the extension is already preloaded with my version if sqlite. Which means I didn't even have to build it :) But now is the question how would I reliably load / not load it in production env if the target user may or may not have sqlite precompiled with it? On Thu, Oct

Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Eugene Mirotin
Thanks for the tips! Don't know about the segfault too but can ignore it for now — this same file works well with the GUI app and with my Node.js program. On Thu, Oct 19, 2017 at 6:38 PM Dan Kennedy wrote: > On 10/19/2017 08:40 PM, Eugene Mirotin wrote: > > Hm, I think

Re: [sqlite] Problems compiling FTS5 extension

2017-10-19 Thread Dan Kennedy
On 10/19/2017 08:40 PM, Eugene Mirotin wrote: Hm, I think that's because the extension is already preloaded with my version if sqlite. Which means I didn't even have to build it :) But now is the question how would I reliably load / not load it in production env if the target user may or may not

[sqlite] virtual tables, and theTrue meaning of pIdxInfo->estimatedCost, pIdxInfo->estimatedRows, and pIdxInfo->idxFlags...

2017-10-19 Thread dave
Hi folks, I am trying to fully understand the impact and correct use of a few subtle features related to virtual tables' the xBestIndex mechanism, and their correct use. Here are my current beliefs: * pIdxInfo->estimatedCost obviously the cost of the proposed plan; a metric of the

[sqlite] Inconsistency between sha1 and sha3 extensions

2017-10-19 Thread Domingo Alvarez Duarte
Hello ! I've tried to use both ext/misc/sha1.c and ext/misc/shathree.c static linked with sqlite3 and noticed that instead of using an unique prefix for hash_step_vformat like (sha1_step_vformat / sha3_step_vformat) giving an error "duplicated symbol" at link time. Also the return of sha1