Re: [sqlite] Why does WAL prevent the need for async IO?

2019-08-13 Thread Keith Medcalf
On Tuesday, 13 August, 2019 03:44, test user wrote: >On this page: >https://www.sqlite.org/asyncvfs.html >Quote: The use of WAL mode largely obviates the need for this >asynchronous >I/O module. >The WAL mode does not change the fact that these operations will >still >block the application

Re: [sqlite] Correct use of sqlite3_vtab_nochange/sqlite3_value_nochange

2019-08-13 Thread Kevin Martin
> On 13 Aug 2019, at 14:08, Richard Hipp wrote: > > I think that is correct. > Great, thanks. > But it never occurred to me that somebody might do this on the PRIMARY > KEY. I don't see any reason why it wouldn't work, though. I have a c++ interface built on top of the virtual table api

Re: [sqlite] DEF CON (wasL A license plate of NULL)

2019-08-13 Thread James K. Lowden
On Mon, 12 Aug 2019 14:14:08 -0600 "Keith Medcalf" wrote: > Perhaps I am just lazy but I see no point in engaging in extra work > for no advantage bool is_true (bool tf) { if (tf == true) { return true; } return false; } --jkl

Re: [sqlite] Powershell Enter-PSSession for sqlite3.exe fails

2019-08-13 Thread Jose Isaias Cabrera
Clinton James, on Friday, August 9, 2019 04:33 PM, wrote... > > You are right, it is the wrong behavior though the command is perfectly valid. > My first example shows the current problem, sqlite3.exe does not bring me > into an > interactive shell. I am trying to get the correct behavior while

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Keith Medcalf
On Tuesday, 13 August, 2019 13:17, Jose Isaias Cabrera wrote: >James K. Lowden, on Tuesday, August 13, 2019 12:31 PM, wrote... >> On Mon, 12 Aug 2019 14:14:08 -0600 "Keith Medcalf", on >>> Perhaps I am just lazy but I see no point in engaging in extra >>> work for no advantage >> bool >>

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Richard Hipp
On 8/13/19, Jose Isaias Cabrera wrote: > > I see all of you smart programmers using this > non-column matching behavior, and I ask myself why? Because that's the way Dennis Richie did it. :-) -- D. Richard Hipp d...@sqlite.org ___ sqlite-users

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-13 Thread Peter da Silva
If the datr/time is stored internally as utc iso8601 text then it will remain compatible with old versions and can implement whatever new behavior is needed on new versions. The bigger question is 'what new behavior'? The only nee behavior seems to be 'let this third party package see it as a

[sqlite] Determining column collating functions

2019-08-13 Thread Manuel Rigger
Hi everyone, Is there a simple way to determine the collating function of a column? PRAGMA table_info does not seem to provide this information. The information could be extracted from sqlite_master, which contains the SQL statements used to create the table or view. While parsing the SQL string

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Warren Young
On Aug 13, 2019, at 1:16 PM, Jose Isaias Cabrera wrote: > > I see all of you smart programmers using this non-column matching behavior, > and I ask myself why? Thoughts? Or not. :-) It started in the days of real terminals, where the extra line was one of the 24-ish you got on a glass tty

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Don V Nielsen
If I were to have coded that junk (and I do see it too many times to count), I would have coded it even junkier, as in bool is_true (bool tf) { if (tf == true) return true; else return false; } If it's single statement following an if and that statement isn't beyond 80 characters, I will

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Jose Isaias Cabrera
Richard Hipp, on Tuesday, August 13, 2019 04:47 PM, wrote... > > On 8/13/19, Jose Isaias Cabrera, on > > > > I see all of you smart programmers using this > > non-column matching behavior, and I ask myself why? > > Because that's the way Dennis Richie did it. :-) Somewhere in my basement exists

[sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Jose Isaias Cabrera
James K. Lowden, on Tuesday, August 13, 2019 12:31 PM, wrote... > > On Mon, 12 Aug 2019 14:14:08 -0600 > "Keith Medcalf", on > > > Perhaps I am just lazy but I see no point in engaging in extra work > > for no advantage > > bool > is_true (bool tf) { > if (tf == true) { >

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Simon Slavin
On 13 Aug 2019, at 9:42pm, Don V Nielsen wrote: > bool is_true (bool tf) > { >if (tf == true) return true; else return false; > } Do you get paid by the line of code ? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Determining column collating functions

2019-08-13 Thread J. King
On August 13, 2019 5:58:54 p.m. EDT, Manuel Rigger wrote: >Hi everyone, > >Is there a simple way to determine the collating function of a column? >PRAGMA table_info does not seem to provide this information. The >information could be extracted from sqlite_master, which contains the >SQL

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-13 Thread J Decker
On Mon, Aug 12, 2019 at 6:54 AM Tim Streater wrote: > On 12 Aug 2019, at 14:30, J Decker wrote: > > > On Mon, Aug 12, 2019 at 5:42 AM Simon Slavin > wrote: > > > >> On 12 Aug 2019, at 1:27pm, Tim Streater wrote: > >> > >> > I don't expect to do that with SQL. My "seconds since the epoch" is >

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-13 Thread Warren Young
On Aug 13, 2019, at 3:11 PM, Jose Isaias Cabrera wrote: > > Somewhere in my basement exists a book called, "The C Programming Language.” It’s worth a re-read, even if you no longer use C. You will certainly find insights that affect however you *do* program these days. The last time I dipped

Re: [sqlite] Determining column collating functions

2019-08-13 Thread Keith Medcalf
On Tuesday, 13 August, 2019 15:59, Manuel Rigger wrote: >Is there a simple way to determine the collating function of a >column? Presently, there is not. >PRAGMA table_info does not seem to provide this information. The >information could be extracted from sqlite_master, which contains the

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-13 Thread Ling, Andy
> This is what I would call "forward compatibility": You expect an old > application > to be able to read file formats of a future version. Do you have an example > where there is really required? I have an Android app that lets you share the database between users. The app will run on a variety

Re: [sqlite] [EXTERNAL] Correct use of sqlite3_vtab_nochange/sqlite3_value_nochange

2019-08-13 Thread Kevin Martin
> On 12 Aug 2019, at 07:53, Hick Gunter wrote: > > You did not state your argc and argv[0] values, Apologies, it is a 2 column table. Full details are: - argc is 4 - argv[0] is the value of the primary key for the row I want to update. - argv[1] is SQLITE_NULL, but as described,

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-13 Thread Dominique Devienne
On Tue, Aug 13, 2019 at 10:58 AM Ling, Andy wrote: > > This is what I would call "forward compatibility": You expect an old > application > > to be able to read file formats of a future version. Do you have an > example > > where there is really required? > > I have an Android app that lets you

[sqlite] Why does WAL prevent the need for async IO?

2019-08-13 Thread test user
Hello, On this page: https://www.sqlite.org/asyncvfs.html Quote: The use of WAL mode largely obviates the need for this asynchronous I/O module. The WAL mode does not change the fact that these operations will still block the application process that embeds SQLite: - Slow read queries.

Re: [sqlite] [EXTERNAL] Why does WAL prevent the need for async IO?

2019-08-13 Thread Hick Gunter
I don't think so. Async IO module creates a queue of pages that will be written to the database file on disk according to available IO bandwidth. WAL mode creats a queue of pages from committed transactions that are written to the database file on disk according to available IO bandwidth.

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-13 Thread Ling, Andy
> > > This is what I would call "forward compatibility": You expect an old > > application > > > to be able to read file formats of a future version. Do you have an > > example > > > where there is really required? > > > > I have an Android app that lets you share the database between users. The >

Re: [sqlite] Correct use of sqlite3_vtab_nochange/sqlite3_value_nochange

2019-08-13 Thread Richard Hipp
On 8/10/19, Kevin Martin wrote: > Hi, > > I have a without rowid virtual table with an implementation of xColumn that > begins with > > if(sqlite3_vtab_nochange(ctx)) return SQLITE_OK; > > If I try to perform an update on this table that doesn't involve a primary > key change, then my

Re: [sqlite] A license plate of NULL

2019-08-13 Thread Jay Kreibich
There are similar stories from many years back about someone that got the vanity plate “MISSING”. -j > On Aug 12, 2019, at 12:09 PM, Simon Slavin wrote: > > Some interesting things are emerging from this year's DEF CON. This one is > related to an issue we've often discussed here. I

Re: [sqlite] [EXTERNAL] Correct use of sqlite3_vtab_nochange/sqlite3_value_nochange

2019-08-13 Thread Hick Gunter
Very strange and AFAICT not documented. I would not have though that calling sqlite3_value_nochange on argv[1] was even legal, given that it would correspond to field number -1. Could you provide an "explain" (SQlite bytecode program dump) of your statement? -Ursprüngliche Nachricht-