Re: [sqlite] New WIndow Functions ... question

2018-07-01 Thread R Smith
On 2018/07/02 1:20 AM, Keith Medcalf wrote: http://www.sqlite.org/draft/releaselog/3_25_0.html Dan, ... On another note, what a really nice addition! +1 Yup, two solid thumbs up - this is probably the most exciting news since the addition of CTEs. Can't wait!

Re: [sqlite] explain this shell command please

2018-07-01 Thread Simon Slavin
On 2 Jul 2018, at 1:40am, David Burgess wrote: > **The same thing happens with a file based database Indeed. Thanks for your neat test. I verify your procedure and bug: 178:~ simon$ sqlite3 ~/Desktop/test.sqlite SQLite version 3.22.0 2017-12-05 15:00:17 Enter ".help" for usage hints. sqlite>

Re: [sqlite] explain this shell command please

2018-07-01 Thread David Burgess
# sqlite3 SQLite version 3.24.0 2018-06-04 19:24:41 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> create table x ( a integer , b integer); insert into x values (1,1),(2,2),(3,3); sqlite> .dump x PRAGMA

Re: [sqlite] explain this shell command please

2018-07-01 Thread Simon Slavin
On 2 Jul 2018, at 1:08am, David Burgess wrote: > Thanks simon. Back to my original issue. Is this a bug? As you suspected, the .dump command should not output "SELECT" commands. Nor should it output SQL commands without a following semicolon. I can't find your original post. Can you show us

Re: [sqlite] explain this shell command please

2018-07-01 Thread David Burgess
Thanks simon. Back to my original issue. Is this a bug? sqlite> .echo on sqlite> .dump x .dump x PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE x ( a integer , b integer); SELECT a,b FROM x INSERT INTO x VALUES(1,1); INSERT INTO x VALUES(2,2); INSERT INTO x VALUES(3,3); COMMIT; sqlite>

Re: [sqlite] explain this shell command please

2018-07-01 Thread Simon Slavin
On 2 Jul 2018, at 12:45am, David Burgess wrote: > I was preparing a test case to report the bug and I note that .dump > does not work on temp tables (3.24). Is this a feature? The TEMP tables are not stored in the main database. They're in an attached database called 'temp'. Unfortunately

[sqlite] explain this shell command please

2018-07-01 Thread David Burgess
I have a few sqlite databases and .dump in the shell seems to work fine for me (unless I have '.echo off') I was preparing a test case to report the bug and I note that .dump does not work on temp tables (3.24). Is this a feature? sqlite> drop table if exists x;create temp table temp.x ( a

Re: [sqlite] Time Precision

2018-07-01 Thread David Burgess
Too long since I have coded for windows. BUT getting a accurate time/interval from a loaded windows system is non-trivial. The multimedia timers are ok (from memory). ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] New WIndow Functions ... question

2018-07-01 Thread Keith Medcalf
They are part of the current draft release: http://www.sqlite.org/draft/releaselog/3_25_0.html Dan, I see that there is a new create function to create the window functions which have some slight changes to the methods being called and what they do. I presume that a function defined with the

Re: [sqlite] Time Precision

2018-07-01 Thread Keith Medcalf
You can make a user-defined function on Windows that returns the UnixTime to the limit of Accuracy of the underlying hardware/software (100 huns max) and to the limit of precision of the IEEE754 double precision floating point format with the following (so an accuracy of 100 nanoseconds with a

Re: [sqlite] Time Precision

2018-07-01 Thread Keith Medcalf
The "unixepoch" time used by SQLite is an "integer" in whole seconds of precision. ISO-8601 datetime strings are also "by default" generated in seconds of precision. If you use strftime rather than datetime then the ISO8601 strings can be read with "unlimited" precision and written with

Re: [sqlite] LIMIT

2018-07-01 Thread Thomas Kurz
> Don't want to spoil any news, it is viewable by the public anyway, but there > are clearly experimental, interesting (and significant) work ongoing by the > SQLite developers around SQL windowing functions. A quick look to the > exp-window-functions branch clearly shows that. They are part

Re: [sqlite] Time Precision

2018-07-01 Thread Igor Tandetnik
On 7/1/2018 2:37 PM, danap wrote: The time precision treated with and defined, ISO-8601, seems to be with regard to seconds. Storage of an Integer for time as an example in SQLite: sqlite> SELECT STRFTIME('%s', 'now', 'localtime'); 1530446557 A 10 digit value. The issue I'm having is with

[sqlite] Time Precision

2018-07-01 Thread danap
The time precision treated with and defined, ISO-8601, seems to be with regard to seconds. Storage of an Integer for time as an example in SQLite: sqlite> SELECT STRFTIME('%s', 'now', 'localtime'); 1530446557 A 10 digit value. The issue I'm having is with regard to storage of time, in

[sqlite] Minor parser bug

2018-07-01 Thread Cezary H. Noweta
Hello, SQLite until the newest one: sqlite> VALUES (1),(); Error: no tables specified should be: sqlite> VALUES (1),(); Error: near ")": syntax error Fix: src/parse.y: values(A) ::= values(A) COMMA LP exprlist(Y) RP. { to values(A) ::= values(A) COMMA LP nexprlist(Y) RP. { (missing

Re: [sqlite] FTS4 content table

2018-07-01 Thread Peter Johnson
I recall you must still enumerate the column names of the fields you wish to link to the contentless table when creating the virtual table. If I remember correctly, failing to do so will result in 'no such column' errors. Last time I looked at the docs I got caught with the same gotcha, the docs

Re: [sqlite] FTS4 content table

2018-07-01 Thread Dan Kennedy
On 06/30/2018 10:24 PM, Dudu Markovitz wrote: Hi according to the documentation - 6.2.2. External Content FTS4 Tables An "external content" FTS4 table is similar to a contentless table, except that if evaluation of a query requires the value of a column other than docid, FTS4 attempts to