[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Domingo Alvarez Duarte
Thanks for reply ! I already sent a proposal to Richard to add a pragma "PRAGMA DEBUG_MODE" and when set throw any kind of error to stderr/sqlite3_(hook) this way ther is no need to store temporary conditions to show later. And of course sqlite knows which table/field failed to flag the error

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Domingo Alvarez Duarte
; > > > > ? -- next part -- An embedded and charset-unspecified text was scrubbed... Name: URL: <http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20160404/b120d769/attachment.ksh>

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Petite Abeille
> On Apr 4, 2016, at 6:14 PM, Richard Hipp wrote: > > On 4/4/16, Domingo Alvarez Duarte wrote: >> sqlite knows which table/field failed > > No it doesn't, actually. And yet, that same question comes over, and over, and over, ad nauseam. Each and every time a poor soul is confronted with tha

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Tim Streater
On 04 Apr 2016 at 17:36, Domingo Alvarez Duarte wrote: > Fair enough ! > > But even then could it have let's say a place for record the last foreign key > violation ? > > Only one place will be better than nothing, it can be overwritten every time > a foreign key is found and at least we could

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Domingo Alvarez Duarte
Thanks for reply ! Thank you for your solution I think it improves the actual situation ! Cheers ! > Mon Apr 04 2016 08:00:38 PM CEST from "Stephen Chrzanowski" > Subject: Re: [sqlite] FOREIGN KEY constraint failed > > I've never developed for a platform with a small memory footprint (Un

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Domingo Alvarez Duarte
I think I found a solution to it ! If the cost of it is too much for normal operation we could have a "pragma debug_foreign_key" (or debug everything) and turn it on, then run again the failed statement and in this mode extra code that saves all info for a detailed error message can be run witho

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Domingo Alvarez Duarte
Thank you for reply ! Good point, but for sure there is great minds here that can come with a solution to this problem ! Sqlite could use a table in memory (or a hash table) and add delete from it as it found violations/resolve then and at then end it has all the violations to show, it can be

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Clemens Ladisch
Domingo Alvarez Duarte wrote: > But even then could it have let's say a place for record the last foreign key > violation ? This would not help if that last constraint is no longer violated at the end of the transaction. Regards, Clemens

[sqlite] Error help

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 7:31pm, Daniel Telvock wrote: > I was taught the basics in SQLite with Firefox, and > am already disappointed that I can't really do what I want to do with the > Firefox plug in. Plenty of other ways to use SQLite with a graphical GUI:

[sqlite] Error help

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 7:22pm, Daniel Telvock wrote: > Even when trained to use SQLite I was told it could handle large CSV files, > and this one was only 1000 rows SQLite handles it fine. I have a 39 Gigabyte database using SQLite. The thing you're using is not SQLite. It's a program which does

[sqlite] Error help

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 6:17pm, Richard Hipp wrote: > It is. Don't confuse SQLite with the Firefox plugin for SQLite. The > limit you have reached seems to be a limitation with the Firefox > plugin, not with SQLite itself. I confirm that the NS_ERROR_STORAGE_CONSTRAINT error is generated by the Mo

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Domingo Alvarez Duarte
Fair enough ! But even then could it have let's say a place for record the last foreign key violation ? Only one place will be better than nothing, it can be overwritten every time a foreign key is found and at least we could have a message like this: "FOREIGN KEY constraint failed (x : la

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Domingo Alvarez Duarte
Hello ! I know this was discussed here before several times, but it seems that still we have poor solution for this on sqlite: FOREIGN KEY constraint failed I have some databases with lots of foreign keys and I sometimes I need to change the structure of some tables and I get this message,

[sqlite] Error help

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 5:04pm, Daniel Telvock wrote: > When you have a columns that has lengthy text, is there a way to label it > so SQLite won't spit it out as an error? There is no problem with storing lengthy text in a SQLite field. It makes no difference how you label the column since everyt

[sqlite] Awesome SQLite Update - New Book - Getting Started with SQL(lite and SQLiteStudio)

2016-04-04 Thread Gerald Bauer
Hello, For you enjoyment I have added three more entries to the Awesome SQLite [1] collection: - sqlite-web (github: coleifer/sqlite-web) by Charles Leifer -- a web-based SQLite database browser written in Python - sqliteweb (github: hypebeast/sqliteweb) by Sebastian Ruml -- a web-based SQLi

[sqlite] regression in 3.12.0 vs. 3.11.0, column type information in PRAGMA missing

2016-04-04 Thread Mike Bayer
The "type" column in PRAGMA table_info() is now a blank string when the target object is a view in 3.12.0. In 3.11.0 and prior versions, the typing information is returned, Version 3.11.0: SQLite version 3.11.0 2016-02-15 17:29:24 Enter ".help" for usage hints. Connected to a transient in-memo

[sqlite] FTS5 problem ? more than 3,000 queries !

2016-04-04 Thread Dan Kennedy
On 04/04/2016 05:43 AM, Domingo Alvarez Duarte wrote: > Hello ! > > I'm testing fts5 on a database with data from hacker news (around 13M > records) and it took more than 2 hours to index, I have this application to > log all queries executed for debugging and although the search isn't slow > it's

[sqlite] C API reference manpages

2016-04-04 Thread Kristaps Dzonsons
-- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 842 bytes Desc: OpenPGP digital signature URL: <http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20160404/cfa317d8/attachment.pgp>

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 12:05pm, Domingo Alvarez Duarte wrote: > Thanks for reply ! > > If I issue this command : > > PRAGMA case_sensitive_like = OFF; > > Then I get the same answer (I mean it uses indexes now): > > explain query plan select * from companies where post_code like 'rg%';

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
Understood, thanks. Clearly, I am a neophyte at this stuff and have not learned how to use SQL with the command line. I was taught the basics in SQLite with Firefox, and am already disappointed that I can't really do what I want to do with the Firefox plug in. I guess I can try to learn Microsoft

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
Using the non plugin option is a little above my head. I haven't been trained to use the command line. Even when trained to use SQLite I was told it could handle large CSV files, and this one was only 1000 rows Dan Telvock Environment Reporter Investigative Post

[sqlite] Error help

2016-04-04 Thread Richard Hipp
On 4/4/16, Simon Slavin wrote: > > On 4 Apr 2016, at 6:17pm, Richard Hipp wrote: > >> It is. Don't confuse SQLite with the Firefox plugin for SQLite. The >> limit you have reached seems to be a limitation with the Firefox >> plugin, not with SQLite itself. > > I confirm that the NS_ERROR_STORAG

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Stephen Chrzanowski
I've never developed for a platform with a small memory footprint (Unless you talk about the Vic20 as being the smallest footprint I've used, but not relevant to SQLite, and my skill was writing text based paint program), but, throwing results like this into memory could cause more issues for devic

[sqlite] C API reference manpages

2016-04-04 Thread Jonathan Moules
How about the CC0 license? I think it's designed for these sorts of things (you want to make something public domain even if you're not allowed to) - https://creativecommons.org/about/cc0/ On Fri, 01 Apr 2016 00:05:30 +0100 Kristaps Dzonsons wrote >> As for publ

[sqlite] Error help

2016-04-04 Thread Richard Hipp
On 4/4/16, Daniel Telvock wrote: > Not sure of size. But I had thought one of benefits of using SQLite was > ability to import larger CSV files or worksheets that slow down in Excel It is. Don't confuse SQLite with the Firefox plugin for SQLite. The limit you have reached seems to be a limitati

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
Thanks for reply ! If I issue this command : PRAGMA case_sensitive_like = OFF; Then I get the same answer (I mean it uses indexes now): explain query plan select * from companies where post_code like 'rg%'; SEARCH TABLE companies USING INDEX companies_post_code_idx (post_code>? AND p

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
Not sure of size. But I had thought one of benefits of using SQLite was ability to import larger CSV files or worksheets that slow down in Excel Dan Telvock Environment Reporter Investigative Post Twitter: @dantelvock 716-831-2626 ext. 3 On Mon, Apr 4, 2016

[sqlite] Error help

2016-04-04 Thread Stephen Chrzanowski
Large CSV? How large? Because the constraint error is probably coming from the browser for an upload constraint on size versus SQLite throwing an error. On Mon, Apr 4, 2016 at 12:26 PM, Daniel Telvock < dtelvock at investigativepost.org> wrote: > I am using the Firefox plugin of SQLite and thi

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
I am using the Firefox plugin of SQLite and this is a large CSV file that I am importing in the wizard. When I try to import, I get that error CHECK constraint failed: REDCs_refined ] Exception Name: NS_ERROR_STORAGE_CONSTRAINT Exception Message: Component returned failure code: 0x80630003 (NS_ERR

[sqlite] Error help

2016-04-04 Thread Richard Hipp
On 4/4/16, Daniel Telvock wrote: > There is a field that contains longer sentences for descriptions. It keeps > giving me an error that the NS Error Storage Constraint. Can you please provide more context about what you are trying to do? I do not understand the description of your problem. > >

[sqlite] FOREIGN KEY constraint failed

2016-04-04 Thread Richard Hipp
On 4/4/16, Domingo Alvarez Duarte wrote: > sqlite knows which table/field failed No it doesn't, actually. SQLite keeps a counter of FK violations and resolutions, and if that counter is zero at the the end of the transaction, then it knows that no FK constraints have failed. If the counter is n

[sqlite] Error help

2016-04-04 Thread Daniel Telvock
There is a field that contains longer sentences for descriptions. It keeps giving me an error that the NS Error Storage Constraint. I've tried labeling the column as VarCHar and Text to not avail. When you have a columns that has lengthy text, is there a way to label it so SQLite won't spit it o

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
It would be a gross mistake if the databases weren't the same. It's an existing and populated database. ? > Mon Apr 04 2016 11:31:45 AM CEST from "Simon Slavin" > Subject: Re: [sqlite] Difference between sqlite3 >executable and application > > On 4 Apr 2016, at 10:19am, Domingo Alvarez D

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 10:47am, Domingo Alvarez Duarte wrote: > It would be a gross mistake if the databases weren't the same. > > It's an existing and populated database. The only thing that comes to mind is that one app is using case sensitive and the other is not. Unfortunately the command t

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
Compile time options used: sqlite3 application (shell): gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -Isqlite3/src -Isqlite3/ext/rtree -Isqlite3/ext/icu -Isqlite3/ext/fts3 -Isqlite3/ext/async -Isqlite3/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DSQLITE_HAS_CODEC=1 -DSQLITE_ENABLE_FTS4=1 -DSQLIT

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
Thanks for reply ! Executing "PRAGMA compile_options;" My application: ENABLE_COLUMN_METADATA ENABLE_FTS3 ENABLE_FTS3_PARENTHESIS ENABLE_FTS4 ENABLE_FTS5 ENABLE_JSON1 ENABLE_RTREE ENABLE_STAT4 ENABLE_UNLOCK_NOTIFY HAS_CODEC OMIT_TCL_VARIABLE SOUNDEX SYSTEM_MALLOC THREADSAFE=1 sqlite3 ap

[sqlite] FTS5 problem ? more than 3,000 queries !

2016-04-04 Thread Domingo Alvarez Duarte
And the indexes are not supposed to be used ? Shouldn't a index cover the ranking too ? It seems a mistake for me. Cheers ! > Mon Apr 04 2016 11:07:51 AM CEST from "Dan Kennedy" > Subject: Re: [sqlite] FTS5 problem ? more than >3,000 >queries ! > > On 04/04/2016 05:43 AM, Domingo Alv

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
Hello ! I have an application that uses sqlite3 and in one database I get different responses between the sqlite3 executable and my application that uses the same sqlite3.c: The query: explain query plan select * from companies where post_code like 'rg%'; My application: 0??? 0??? 0?

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 10:19am, Domingo Alvarez Duarte wrote: > I do not see something significant here to justify sqlite3 using indexes and > my application not using then. For the SQLite shell tool, are you opening the same database file or are you entering CREATE TABLE commands ? Simon.

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Simon Slavin
On 4 Apr 2016, at 9:53am, Domingo Alvarez Duarte wrote: > What compile time options if any can cause this ? I recommend you compare the results of PRAGMA compile_options; on the two platforms. Simon.

[sqlite] Awesome SQLite Update - New Book - Getting Started with SQL(lite and SQLiteStudio)

2016-04-04 Thread Gerald Bauer
Hello, I've updated the Awesome SQLite [1] collection over at Planet Open Data. What's news? Added a new beginner's book: Getting Started with SQL - A Hands-On Approach for Beginners - by Thomas Nield; 2016; O'Reilly; 134 pages -- learn SQL with SQLite and SQLiteStudio Anything missing?

[sqlite] FTS5 problem ? more than 3,000 queries !

2016-04-04 Thread Domingo Alvarez Duarte
Hello ! I'm testing fts5 on a database with data from hacker news (around 13M records) and it took more than 2 hours to index, I have this application to log all queries executed for debugging and although the search isn't slow it's making a lot of queries. Is this normal ? More than 3,000 qu