Re: [sqlite] Poll: Include the recent sqlite3_column_name() fix in the upcoming 3.20.0 release?

2017-07-31 Thread Peter Da Silva
Any application that depends on column names should be using “AS” anyway, might as well break them sooner. Disclaimer: I’m probably guilty of depending on column names without “AS”, which explains why I’ve been sneezing so much lately. On 7/31/17, 10:21 AM, "sqlite-users on behalf of Richard

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-31 Thread Peter Da Silva
If you’re in a position to perform an attack that address space randomization can defend against, then you have already successfully performed a code execution attack. And so far as I can tell... *any* constant strings in the executable, including things like elements of the SQL language

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-03 Thread Peter Da Silva
On 8/3/17, 9:16 AM, "sqlite-users on behalf of Ulrich Telle" wrote: > The description of the new pointer-passing interface gives the impression > that restricting the pointer type parameter to static strings or

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-03 Thread Peter Da Silva
On 8/3/17, 8:56 AM, "sqlite-users on behalf of Ulrich Telle" wrote: > Nevertheless, I think the pointer type string restriction gives a false sense > of security. You described creating a malicious extension that

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-03 Thread Peter Da Silva
On 8/3/17, 8:27 AM, "sqlite-users on behalf of Ulrich Telle" wrote: > I really don't think that the latter is true. To overcome the restriction is > extremly simple, if you don't care about memory leaks. Just do

Re: [sqlite] Problem with the new pointer-passing interface

2017-08-03 Thread Peter Da Silva
On 8/3/17, 4:22 AM, "sqlite-users on behalf of Ulrich Telle" wrote: > IMHO it would be better if the function sqlite3_bind_pointer would make a > copy of the type string and would thus be independent of the life

Re: [sqlite] Version 3.20.0 coming soon...

2017-07-13 Thread Peter da Silva
Nicely put. There’s a couple of prepared statements that I’m using that absolutely will benefit from this, now I understand it. On 7/13/17, 3:30 PM, "sqlite-users on behalf of Marc L. Allen" wrote: If

[sqlite] Return value of Tcl interface to wal_hook

2017-07-14 Thread Peter da Silva
In wal_hook we have: ** The callback function should normally return [SQLITE_OK]. ^If an error ** code is returned, that error will propagate back up through the ** SQLite code base to cause the statement that provoked the callback ** to report an error, though the commit will have still

Re: [sqlite] Possible inaccuracy in "Isolation In SQLite" paper

2017-07-18 Thread Peter Da Silva
I notice that “read_uncommitted pragma” is spelled “PRAGMA read_uncommitted” in one place. The links all match. This small inconsistency is probably a mistake. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Database version

2017-07-21 Thread Peter Da Silva
I assume BEGIN, COMMIT, and ROLLBACK are safe too :) On 7/21/17, 1:08 PM, "sqlite-users on behalf of Richard Hipp" wrote: On 7/21/17, Simon Slavin wrote: > > The new features

Re: [sqlite] Database version

2017-07-21 Thread Peter Da Silva
https://www.sqlite.org/c3ref/c_source_id.html This is also stored at offset 96 in the db file: https://www.sqlite.org/fileformat.html I don’t think there’s a pragma for extracting it from within SQLite code. On 7/21/17, 9:58 AM, "sqlite-users on behalf of Igor Korot"

Re: [sqlite] UPDATE database using parameters

2017-07-21 Thread Peter Da Silva
Have a look at prepared statements and statement parameters. Also, if you’re quoting strings you should use single quotes rather than double quotes. Double quotes just override the tokenizer, the result is still untyped and technically an identifier (the tokenizer actually marks it as TK_ID)

Re: [sqlite] UPDATE database using parameters

2017-07-21 Thread Peter Da Silva
Using a straight PHP-level substitution like that performs the substitution before the SQL parser sees it. It’s also super dangerous if you’re not absolutely sure there’s no path for an untrusted agent to inject the name you’re selecting on. https://xkcd.com/327/ On 7/21/17, 3:42 AM,

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-25 Thread Peter Da Silva
On 7/25/17, 11:25 AM, "sqlite-users on behalf of petern" wrote: > You're trying to change the topic to the security model. All I was doing was pointing out that hiding the type information from attackers is

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-24 Thread Peter Da Silva
What about imposing some structure on the pointer type strings that uses a guaranteed unique substring, for example “org.sqlite.fts3.snippet”, to ensure there wouldn’t be accidental conflicts? On 7/24/17, 6:54 AM, "sqlite-users on behalf of Richard Hipp"

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-24 Thread Peter Da Silva
un...@mailinglists.sqlite.org] Im Auftrag von Peter Da Silva Gesendet: Montag, 24. Juli 2017 15:37 An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Betreff: Re: [sqlite] New draft document on the new pointer-passing interfaces What about imposing

Re: [sqlite] New draft document on the new pointer-passing interfaces

2017-07-24 Thread Peter Da Silva
On 7/24/17, 3:50 PM, "sqlite-users on behalf of petern" wrote: > BTW, if the hypothetical attacker has a copy of the application, aren't the > constant space pointer access keys' string addresses all there

Re: [sqlite] UPDATE database using parameters

2017-07-24 Thread Peter Da Silva
On 7/22/17, 1:46 AM, "sqlite-users on behalf of Keith Medcalf" wrote: > Not very well. How do you think "drive by downloads" work? Javascript in > browsers is the most dangerous thing ever invented! I think the

Re: [sqlite] Database version

2017-07-21 Thread Peter Da Silva
On 7/21/17, 10:14 AM, "sqlite-users on behalf of Igor Korot" wrote: > This is also stored at offset 96 in the db file: > > https://www.sqlite.org/fileformat.html Is this the number I'm after?

Re: [sqlite] Database version

2017-07-21 Thread Peter Da Silva
The problem is that SQLITE_VERSION_NUMBER is not “the database version”, it’s something like “the last version of SQLite that committed a transaction”. The database version number is “3”. ___ sqlite-users mailing list

Re: [sqlite] Database version

2017-07-21 Thread Peter Da Silva
On Fri, Jul 21, 2017 at 11:35 AM, Peter Da Silva <peter.dasi...@flightaware.com> wrote: > The problem is that SQLITE_VERSION_NUMBER is not “the database version”, it’s something like “the last version of SQLite that committed a transaction”. > > The databas

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Peter da Silva
I always saw byte as something that was relevant for systems that could address objects smaller than words... “byte addressed” machines. The term was mnemonic for something bigger than a bit and smaller than a word. It was usually 8 bits =but there were 36-bit machines that were byte

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-28 Thread Peter da Silva
On 6/27/17, 4:02 PM, "sqlite-users on behalf of Keith Medcalf" wrote: > Nowadays we use 8 bits for data with no parity, no error correction, and no > timing bits. Cuz when things screw up we want them to REALLY

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Peter da Silva
On 6/29/17, 1:22 AM, "sqlite-users on behalf of Robert M. Münch" wrote: > Hi, sorry, should have mentioned that this doesn't work in my case, because > we are building the column placeholders dynamically.

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Peter da Silva
On 6/29/17, 5:20 AM, "sqlite-users on behalf of R Smith" wrote: > SQLite isn't helping the confusion in this case, because it allows > double-quotes to be regarded as string values IF an identifier with that name >

Re: [sqlite] Thinking about a way to extend the number of writers in WAL mode

2017-08-04 Thread Peter Da Silva
On 8/4/17, 1:28 PM, "sqlite-users on behalf of Nico Williams" wrote: > Imagine a mode where there is only a WAL, and to checkpoint is to write a new > WAL with only live contents and... rename(2) into place. Such

Re: [sqlite] Thinking about a way to extend the number of writers in WAL mode

2017-08-04 Thread Peter Da Silva
On 8/4/17, 1:59 PM, "sqlite-users on behalf of Nico Williams" wrote: > The checkpoint process would look like this: > - make a new file in the same directory > - copy the DB to the new file > - rename the new

Re: [sqlite] Thinking about a way to extend the number of writers in WAL mode

2017-08-04 Thread Peter Da Silva
On 8/4/17, 1:45 PM, "sqlite-users on behalf of Nico Williams" wrote: > SQLite3's WAL is already log-structured. The main DB file isn't. So SQLite3 > is a hybrid. But it doesn't have to be a hybrid. One issue I

Re: [sqlite] sequencer

2017-08-02 Thread Peter Da Silva
Have a look at https://sqlite.org/autoinc.html Also keep in mind that latency for SQLITE is low, since it’s not client-server, so you can script a transaction that has any sequence behavior you want with similar overhead to having SQLITE implement the sequence for you. On 8/2/17, 10:23 AM,

Re: [sqlite] sequencer

2017-08-02 Thread Peter Da Silva
+ increment) WHERE table = :table and column = :column; COMMIT; On 8/2/17, 10:37 AM, "sqlite-users on behalf of Sylvain Pointeau" <sqlite-users-boun...@mailinglists.sqlite.org on behalf of sylvain.point...@gmail.com> wrote: On Wed, Aug 2, 2017 at 5:27 PM, Peter Da Silva

Re: [sqlite] sequencer

2017-08-02 Thread Peter Da Silva
ote: On Wed, Aug 2, 2017 at 5:43 PM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > Hence the suggestion to script a transaction. For example, in pseudocode: > > BEGIN; > SELECT value, increment from super_sequences where table = :table and

Re: [sqlite] sequencer

2017-08-02 Thread Peter Da Silva
qlite-users on behalf of Sylvain Pointeau" <sqlite-users-boun...@mailinglists.sqlite.org on behalf of sylvain.point...@gmail.com> wrote: On Wed, Aug 2, 2017 at 5:54 PM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > Can’t you do the same basic logic th

Re: [sqlite] Mailinglist question

2017-08-09 Thread Peter Da Silva
On 8/9/17, 2:45 PM, "sqlite-users on behalf of Nico Williams" wrote: > I'm not fond of web fora, but a good integration would be nice, for sure. An > IMAP service would be fantastic for users like me. The need

Re: [sqlite] Feature request: check for 'lib' prefix for load_extension()

2017-08-04 Thread Peter Da Silva
On 8/4/17, 8:29 AM, "sqlite-users on behalf of Bob Friesenhahn" wrote: > Lazy programmers who request such things are of the same ilk which use > programming practices resulting in SQL injection attacks.

Re: [sqlite] Tcl sqlite3 bindings - NULL handling in `$db eval $sql array { ... }`

2017-06-26 Thread Peter da Silva
On 6/26/17, 9:00 AM, "sqlite-users on behalf of Richard Hipp" wrote: > The "db nullvalue STRING" command lets you translate NULL values into the > string value of your choice. But there is not (currently) a way to

[sqlite] Tcl sqlite3 bindings - NULL handling in `$db eval $sql array { ... }`

2017-06-26 Thread Peter da Silva
What’s the best way to handle NULLs out of band when walking the results of a query: $sqlite_db eval “SELECT * FROM table ...” array { ... } In other Tcl database bindings it’s common to return arrays containing possible null values with NULL values simply unset, so `[info exists]` can

Re: [sqlite] UTF8-BOM not disregarded in CSV import

2017-06-26 Thread Peter da Silva
On 6/26/17, 2:09 AM, "sqlite-users on behalf of Eric Grange" wrote: > Alas, there is no end in sight to the pain for the Unicode decision to not > make the BOM compulsory for UTF-8. It’s not actually providing any

Re: [sqlite] Tcl sqlite3 bindings - NULL handling in `$db eval $sql array { ... }`

2017-06-26 Thread Peter da Silva
On 6/26/17, 11:48 AM, "drhsql...@gmail.com on behalf of Richard Hipp" wrote: > OK. I'll back out the change, then. That’s definitely safer, it’s a super useful capability but needs to be applied selectively.

Re: [sqlite] Tcl sqlite3 bindings - NULL handling in `$db eval $sql array { ... }`

2017-06-26 Thread Peter da Silva
On 6/26/17, 11:15 AM, "drhsql...@gmail.com on behalf of Richard Hipp" wrote: > If you get the latest check-in (https://www.sqlite.org/src/info/trunk) there > is a new option on the "sqlite3" command called "-unsetnull 1" which causes > "db

Re: [sqlite] UTF8-BOM not disregarded in CSV import

2017-06-26 Thread Peter da Silva
I didn’t mean to imply you had to scan the whole content for a BOM, but rather for illegal characters in the absence of a BOM. On 6/26/17, 10:02 AM, "sqlite-users on behalf of Simon Slavin" wrote: Folks, I’m

Re: [sqlite] UTF8-BOM not disregarded in CSV import

2017-06-26 Thread Peter da Silva
Just occurred to me: another problem with the BOM is that some people who are *not* writing UTF-8 are cargo-culting the BOM in anyway. So you may have to scan the whole file to see if it’s really UTF-8 anyway. You’re better off just assuming UTF-8 everywhere, generating an error (and backing

Re: [sqlite] XOR operator

2017-10-08 Thread Peter Da Silva
Generally, when you talk about whether a language is strongly or weakly typed, you're talking about the storage, not the content. Pretty much every "weakly typed" language out there (there are a few exceptions, like Tcl) does have fully typed values. In many cases you can even interrogate the

Re: [sqlite] Script Embedded SQLite With TCL

2017-10-11 Thread Peter Da Silva
There doesn’t seem to be a straightforward way to get the SQLite handle from the Tcl SQL command, but it is possible. https://github.com/flightaware/Pgtcl/blob/master/generic/pgtclSqlite.c#L838 On 10/7/17, 9:31 AM, "sqlite-users on behalf of apajabo yaro"

Re: [sqlite] Best way to develop a GUI front-end

2017-11-15 Thread Peter Da Silva
Tk is platform independent, so long as you don’t do UNIX-specific stuff (eg, assume UNIX file paths and stuff) any Tk app should work just fine on Windows. You may need to tweak the fonts, eg: if { $tcl_platform(platform) eq "windows" } { set font {Arial} } else { set font {Helvetica} }

Re: [sqlite] Simple SQL question?

2017-11-15 Thread Peter Da Silva
Wouldn’t you create a view instead, and not bother calculating age_at_issue until necessary since it’s derived completely from two other columns? On 11/15/17, 3:16 PM, "sqlite-users on behalf of Bart Smissaert"

Re: [sqlite] Best way to develop a GUI front-end

2017-11-14 Thread Peter Da Silva
On 11/14/17, 3:33 PM, "sqlite-users on behalf of Balaji Ramanathan" wrote: > I am leaning towards tcl/tk given the endorsement from both Peter and DRH. > So, I downloaded tcl/tk version 8.6.7 from magicsplat

Re: [sqlite] how into insert row into middle of table with integer primary key

2017-11-22 Thread Peter Da Silva
On 11/22/17, 1:43 AM, "sqlite-users on behalf of R Smith" wrote: > Oh there are many valid reasons why to have Order in data, one I use > regularly is to dictate the process flow in manufacturing where some thing >

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-22 Thread Peter Da Silva
On 11/21/17, 9:54 PM, "sqlite-users on behalf of jose isaias cabrera" wrote: > But, whatever it is, I will be part of the next phase of communication. This. ___

Re: [sqlite] "BIGINT" doesn't act like INTEGER on table creation [Bug]

2017-11-25 Thread Peter Da Silva
Are people here talking about UUIDs or things that just look like UUIDs? It sounds like the latter. UUIDs are actually structured objects, with embedded type bits. There are multiple UUID generation schemes, one of which is based on random numbers, others are based on hashes, and there is the

Re: [sqlite] "BIGINT" doesn't act like INTEGER on table creation [Bug]

2017-11-25 Thread Peter Da Silva
Ah, I see someone else has already brought up version 1 UUIDs. > What about invalid and reused MAC addresses and devices with no MAC address > at all? Not an issue with SQLite since that part of the UUID is a constant within a given database. It would be reasonable to simply pick "0" then set

Re: [sqlite] "BIGINT" doesn't act like INTEGER on table creation [Bug]

2017-11-25 Thread Peter Da Silva
>> What about time resets to the epoch which are not restored, user time >> changes, > > I know some systems at least increment the node each time a time change is > detected. It will take 2^47 time changes to roll over. Since the node part is > not relevant to SQLite, this is perfectly safe.

Re: [sqlite] Is this a bug with expression evaluation?

2017-12-14 Thread Peter Da Silva
On 12/14/17, 12:08 PM, "sqlite-users on behalf of Simon Slavin" wrote: > Just to remind you that if something is not documented it can change. The > next version of SQLite might decide that 1 / 2 is 0. So don’t

Re: [sqlite] Odd question

2017-12-18 Thread Peter Da Silva
What I don’t understand is this app that’s making SQLite calls, so it’s using the SQLite library, and it’s expecting a result from updates and inserts? That seems like a bug or design flaw in the application. Possibly it’s looking for the number of rows effected result and not finding it for

Re: [sqlite] Seasonal syntax

2017-12-15 Thread Peter Da Silva
SELECT name, address CASE behaviour WHEN 'nice' THEN SELECT toy FROM stocking_stuffers ORDER BY random() LIMIT 1 WHEN 'naughty' THEN 'coal' ELSE phnglui mgwlnafth cthulhu END ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Starting with TCL

2017-11-17 Thread Peter Da Silva
Sqlite will perform the substitution of Tcl variables in a query. You can flag the variable with a ‘$’ or with a ‘:’ (which makes it more like other SQL APIs). So you can write: $db eval { SELECT Tea FROM teaInStock ORDER BY LastUsed DESC

Re: [sqlite] Simple Search using LIKE or something else

2017-11-10 Thread Peter Da Silva
Looking back through the thread, from the original post: > I'm using the amalgamation by default, so I don't think FTS is in the DLL. I > can recompile, but that now introduces complications on machines that may not > have this exact DLL. (A couple people in my company use this app) The same

Re: [sqlite] how into insert row into middle of table with integer primary key

2017-11-20 Thread Peter Da Silva
If you want to maintain something like a user-selected display order, I would suggest adding an explicit “display order” column. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-21 Thread Peter Da Silva
On 11/21/17, 10:30 AM, "sqlite-users on behalf of Keith Medcalf" wrote: > I simply tell those people that they either (a) fix their systems or (b) use > snail-mail. Takes care of the problem entirely. I am

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-21 Thread Peter Da Silva
On 11/21/17, 9:59 AM, "sqlite-users on behalf of Keith Medcalf" wrote: > If you run an RFC complaint MTA then there is really very little problem with > SPAM at all -- I have many connections per second rejected for

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-21 Thread Peter Da Silva
On 11/21/17, 11:21 AM, "sqlite-users on behalf of Warren Young" wrote: > You don’t get proper threading with the current ticket comment system, but > both mailers I use these days lack that feature, as do most forum

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-21 Thread Peter Da Silva
I’m a mailing list fan, too. Reddit I use for yucks only. On 11/21/17, 10:48 AM, "sqlite-users on behalf of Stephen Chrzanowski" wrote: All in all, just please, oh PLEASE stay away from redit I will not

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-21 Thread Peter Da Silva
On 11/21/17, 8:52 AM, "sqlite-users on behalf of Dominique Devienne" wrote: > After re-inventing database and source-control, forum software next? :) I > have no doubt it would be lean, fast, SQLite-based, in C

Re: [sqlite] Starting with TCL

2017-11-16 Thread Peter Da Silva
On 11/16/17, 11:37 AM, "sqlite-users on behalf of Cecil Westerhof" wrote: > When I use: > db eval {SELECT * FROM teaInStock} { >puts $Tea, $Location > } puts takes a single string, so you can do

Re: [sqlite] Best way to develop a GUI front-end

2017-11-15 Thread Peter Da Silva
I contacted the Tcl core team and this is the response from Steve Landers: > tcl-lang.org was a temporary measure a few years ago when the .tk DNS went > missing. It wasn’t advertised but I guess it is now. > I’ve fixed it The official site is still at tcl.tk.

Re: [sqlite] Best way to develop a GUI front-end

2017-11-15 Thread Peter Da Silva
On 11/14/17, 10:32 PM, "sqlite-users on behalf of J Decker" wrote: > Initially I was interested in tcl/tk, and still am, but I'm not sure about > the tcl/tk packaging that would be necessary to make use on multiple >

Re: [sqlite] Best way to develop a GUI front-end

2017-11-13 Thread Peter Da Silva
Since sqlite originated as a Tcl extension it’s got excellent Tcl bindings, and Tcl has an excellent platform-independent GUI in Tk, so it seems to me that would be the best and simplest way to create a GUI front end for sqlite. ___ sqlite-users

Re: [sqlite] Unexpected result from SELECT * FROM (subquery);

2017-11-05 Thread Peter Da Silva
The table contains a single row with a single column that contains a string. That doesn't make it a string. It's still a table. When you say "select ... from table" it doesn't matter where the table came from, it's still an operation on a table. You are not performing "select ... from 'tab1';",

Re: [sqlite] Unexpected result from SELECT * FROM (subquery);

2017-11-05 Thread Peter Da Silva
On 2017-11-05, at 05:28, Klaus Maas wrote: > I thought it was because what SQL returns is a value (in this case a string) > and not an object? > > The string value might be the same as the name of an object, but is not the > object. Select returns a table, not a name or a

Re: [sqlite] Typos in the documentation

2017-11-09 Thread Peter Da Silva
Also perhaps “page cache” rather than “pager cache”? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Simple Search using LIKE or something else

2017-11-09 Thread Peter Da Silva
On 11/9/17, 2:51 PM, "sqlite-users on behalf of Stephen Chrzanowski" wrote: > I've added a simple filter function that uses SQLites LIKE operator, but I'd > like something a little bit more advanced. Right now, the

Re: [sqlite] Automatic indexes don't work on without rowid tables

2017-11-08 Thread Peter Da Silva
On 11/8/17, 8:20 AM, "sqlite-users on behalf of Richard Hipp" wrote: > The technical reason for this is that, from the point of view of the query > planner, a WITHOUT ROWID table is really a covering index So basically

Re: [sqlite] Good resources for TCL/TK

2017-12-04 Thread Peter Da Silva
Like expr {sqrt($foo) < 3.7 && $bazflag > 0} Instead of expr sqrt($foo) < 3.7 && $bazflag > 0 Same for the first argument to “if”, second argument to “for”, etc. On 12/4/17, 9:27 AM, "sqlite-users on behalf of Cecil Westerhof"

Re: [sqlite] extracting domain names from website addresses efficiently

2017-12-11 Thread Peter Da Silva
This seems like a job for regular expressions. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to store as integer

2017-12-06 Thread Peter Da Silva
I’d recommend expr {double($temp)} so the bytecode compiler can optimize the expression. On 12/6/17, 8:40 AM, "sqlite-users on behalf of Cecil Westerhof" wrote: return [expr double(${temp})]

Re: [sqlite] SQLite on iOS with NSFilePresenter/NSFileCoordinator

2017-10-25 Thread Peter Da Silva
On 10/25/17, 10:42 AM, "sqlite-users on behalf of Arno Gramatke" wrote: >Jens, Simon, > > thanks for your feedback and suggestions. I will take a closer look at > keeping a "shadow“ copy in the current

Re: [sqlite] SQLite on iOS with NSFilePresenter/NSFileCoordinator

2017-10-25 Thread Peter Da Silva
On 10/25/17, 11:18 AM, "sqlite-users on behalf of Richard Hipp" <sqlite-users-boun...@mailinglists.sqlite.org on behalf of d...@sqlite.org> wrote: > On 10/25/17, Peter Da Silva <peter.dasi...@flightaware.com> wrote: > > Another question I have is... is an

Re: [sqlite] Always call a value-quoting routine

2018-05-07 Thread Peter Da Silva
On 5/7/18, 2:14 AM, "sqlite-users on behalf of Scott Robison" wrote: It could just indicate someone with a sense of humor who crafted a name that looks like an injection attack for their company. Most

Re: [sqlite] Fossil Delta Compression in SqLite

2018-05-07 Thread Peter Da Silva
On 5/6/18, 11:23 AM, "sqlite-users on behalf of Philip Bennefall" wrote: Only the requirement for attribution in binaries. That can be significant in certain use cases. One line of text in the documentation

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-14 Thread Peter Da Silva
On 5/13/18, 6:48 AM, "sqlite-users on behalf of Howard Chu" wrote: SQLightning Do you have a link to the currently updated version of this? Google gives me projects that haven't been updated since 2015.

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-14 Thread Peter Da Silva
Now I'm even more confused, there's "sqlightning" and "sqlitening". Are these different names for the same project? It doesn't seem so. Which was intended? https://github.com/LMDB/sqlightning On 5/14/18, 8:47 AM, "sqlite-users on behalf of Bernard Ertl"

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-14 Thread Peter Da Silva
On 5/14/18, 9:17 AM, "sqlite-users on behalf of Bernard Ertl" wrote: Apologies if I muddled the waters here. I read the "SQLightning" response below as SQLitening. I didn't know there was a similarly

Re: [sqlite] shell edit quoting

2018-05-14 Thread Peter Da Silva
I think you're in "csv mode": sqlite> select sql from sql_procs where name = 'a'; select * from "mytable" ; sqlite> .header on sqlite> .mode csv sqlite> select sql from sql_procs where name = 'a'; sql "select * from ""mytable"" ; " On 5/13/18, 7:04 PM, "sqlite-users on behalf of David Burgess"

Re: [sqlite] Always call a value-quoting routine

2018-05-08 Thread Peter Da Silva
Nicely retro-feel website too: https://droptablecompanies.co.uk/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-15 Thread Peter Da Silva
On 5/15/18, 1:25 AM, "Howard Chu" <h...@symas.com> wrote: Peter Da Silva wrote: > On 5/13/18, 6:48 AM, "sqlite-users on behalf of Howard Chu" <sqlite-users-boun...@mailinglists.sqlite.org on behalf of h...@symas.com> wrote: > > SQ

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread Peter Da Silva
To another post hating on Excel - Excel has many flaws, but this is not one of them, it's a fault of the list-separator setting in the Windows OS on which the Excel runs. CSV is an interchange format, it's for software to communicate with other software, so the syntax needs to be

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread Peter Da Silva
On 5/1/18, 1:42 PM, "sqlite-users on behalf of R Smith" wrote: My point is that CSV was not necessarily "meant" to be what you say. Who exactly "meant" for it to be that? Because the official stuff

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread Peter Da Silva
On 5/1/18, 1:15 PM, "sqlite-users on behalf of R Smith" <sqlite-users-boun...@mailinglists.sqlite.org on behalf of ryansmit...@gmail.com> wrote: On 1 May 2018, at 6:43pm, Peter Da Silva<peter.dasi...@flightaware.com> wrote: > CSV is an interchange

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread Peter Da Silva
Having tried to write a generic clean HANDLES ALL CSV reader for speedtables, I kind of want to burn Excel with nuclear fire, but that's a side issue. :) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Move to Github!!?

2017-12-27 Thread Peter Da Silva
On 12/27/17, 12:14 PM, "sqlite-users on behalf of Simon Slavin" wrote: > Would running git/fossil on a filesystem like that solve the problem ? You would have to modify it to use the new APIs for things like

Re: [sqlite] difference between 'ID IS NULL' and 'ID = NULL'

2018-01-06 Thread Peter Da Silva
These are different requests in SQL. "ID = NULL" is comparing the ID to "NULL". Comparing any value to "NULL" fails. This is equivalent to SELECT ID FROM Tbl WHERE FALSE; A smarter query planner would run it in zero ms. :) "ID IS NULL" is checking if the value in ID is null. Neither will

Re: [sqlite] new Error database disk image is malformed

2018-01-04 Thread Peter Da Silva
> Ok. I've read the Document and I think I may be having a rouge thread issue. > I hope not since I use synclock in my code when ever a thread is attempting a > write to the database. That seems like the only issue from that page that I > may be doing. I could have up to 30 or more threads

Re: [sqlite] Can an SQL script be built from within sqlite?

2018-01-15 Thread Peter Da Silva
I would have thought that the logical platform-independent scripting language to use with sqlite would be tcl. By default tcl comes with sqlite built in, so you don’t even need to compile anything. ___ sqlite-users mailing list

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Peter Da Silva
On 1/17/18, 11:07 AM, "sqlite-users on behalf of Jens Alfke" wrote: > If I were tackling this, I’d look for an open-source CSV parser/generator > library. Once you have that, the part that reads/writes the rows to

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread Peter Da Silva
On 1/16/18, 10:29 AM, "sqlite-users on behalf of petern" wrote: > https://sqlite.org/csv.html BTW typo on that page: “The example above showed a single filename='th3file.csv' argument for the CSV

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread Peter Da Silva
On 1/26/18, 8:24 AM, "sqlite-users on behalf of Gary R. Schmidt" wrote: > But how would you differentiate EOF??? (Let me guess, 0. :-) ) End of file is not part of the contents of the file or a string.

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread Peter Da Silva
What is the goal of this discussion? Changing the string terminator SQLite uses? I think it's almost 50 years too late for that, but I'm sure that if Unicode and UTF8 had been a thing in 1970 then C would have selected FF as the string terminator.

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread Peter Da Silva
On 1/26/18, 12:12 PM, "sqlite-users on behalf of Keith Medcalf" wrote: > Actually, EOF (0xFF) *is* part of a text file, and is the byte in an ASCII > byte-stream that indicates end-of-file. In the "old days" the

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread Peter Da Silva
On 1/26/18, 12:31 PM, "sqlite-users on behalf of J Decker" wrote: > ctrl-z was end of file text character in DOS (wrote char 26; not FF) DOS wasn't an operating system.

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread Peter Da Silva
On 1/26/18, 12:40 PM, "sqlite-users on behalf of J Decker" wrote: > reads the bytes and does things with them. the EOF would get returned with > fgetc() but not the character. Fgetc returns an int, not a byte. That

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread Peter Da Silva
On 1/26/18, 1:37 PM, "sqlite-users on behalf of J Decker" wrote: >doesn't get 26 either. 0x1a 26 isn't EOF, it's SUB (substitute). It was used to represent untranslatable characters when converting (for example)

  1   2   >