[sqlite] Typo in window function docs

2018-07-02 Thread Domingo Alvarez Duarte
Hello ! This sql example on the new window function docs is missing the parenthesis on the "rank" function: === SELECT x, y, row_number() OVER*win1*, rank OVER*win2* FROM t0 --< here the rank function is missing "()" WINDOW*win1* AS (ORDER BY y RANGE BETWEEN UNBOUNDED PRECEDING AND CU

[sqlite] The upcoming alter table rename column

2018-08-14 Thread Domingo Alvarez Duarte
Hello Richard ! I'm following the changes you are making to a add "alter table rename column" capability to sqlite and I think that it's a good moment to add a new system table for the columns (I know that we can somehow get this info now with "pragmas") this way we can get/use this info using

[sqlite] The server https://www3.sqlite.org/ is not working

2018-09-11 Thread Domingo Alvarez Duarte
Hello Richard ! Today the server https://www3.sqlite.org/ is not working, I usually follow the sqlite3 repository daily and I think that could be a good idea to add an option to fossil update command to allow override the url for the repository so in cases like today I could do: fossil updat

[sqlite] FTS5 minimum number of characters to index ?

2018-09-21 Thread Domingo Alvarez Duarte
Hello ! I'm looking in the documentation and it doesn't seem to mention any option to specify a minimum number of characters to index, looking at some fts5 tables it seems that an option to limit the minimum number of characters to at least 2 or 3 would be a good shot as stopwords, another in

[sqlite] FTS5 min_word_size patch

2018-09-21 Thread Domingo Alvarez Duarte
Hello ! After reporting here previously about this issue I've got a working implementation of "min_word_size" option to Unicode61Tokenizer see patch bellow. With it here is the result of a simple test: ./sqlite3 SQLite version 3.26.0 2018-09-20 20:43:28 Enter ".help" for usage hints. C

[sqlite] FTS5 min_word_size patch small error

2018-09-21 Thread Domingo Alvarez Duarte
Hello ! On my last post about a patch to fts5 to add an option "min_word_size" there is a small mistake on the comparison: Original with mistake: if(p->nMinWordSize && p->nMinWordSize >= wsz) continue; New with mistake fixed (it should be ">" instead of ">="): if(p->nMinWordSize && p->nMinW

[sqlite] Compression for ft5

2018-09-24 Thread Domingo Alvarez Duarte
Hello ! After looking at how compression is implemented in fts3 and wanting the same for fts5 I managed to get a working implementation that I'm sharing here with the same license as sqlite3 in hope it can be useful to others and maybe be added to sqlite3. Cheers ! Here is on implementatio

Re: [sqlite] Compression for ft5

2018-09-25 Thread Domingo Alvarez Duarte
for sharing! I wonder though, is the compression done per field? I read the source but I couldn't figure it out quickly (not really used to the sqlite codebase). What are the compression ratios you achieve? Wout. On Mon, Sep 24, 2018 at 3:58 PM Domingo Alvarez Duarte wrote: Hello !

[sqlite] Problem with https://www3.sqlite.org

2018-11-10 Thread Domingo Alvarez Duarte
Hello Richard ! It seems that you have a problem again with https://www3.sqlite.org for several days now. It can't be reached. Cheers ! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailma

[sqlite] Again https://www3.sqlite.org is down

2018-12-12 Thread Domingo Alvarez Duarte
Hello Richard ! It seems that https://www3.sqlite.org is down for a few days. Cheers ! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Ideas or Guide on SQLite Search Engine for a relational database?

2019-01-20 Thread Domingo Alvarez Duarte
Hello Scoott ! I have done some work with a prototyping tool for data applications using sqlite https://github.com/mingodad/db-api-server and use for navigate several opendata sources like (sorry it is in Spainsh) https://meimporta.eu look here https://borme.w.meimporta.eu/bormeMalaga-lm.app

[sqlite] Fossil problem ?

2019-02-21 Thread Domingo Alvarez Duarte
Hello ! I follow the fossil and sqlite3 repository frequently and times to times this thing happen again: Suddenly the my repositories stop following trunk with no clear reason, like now the sqlite3 repository stopped following trunk for some days and I've tried several times merge the trunk

[sqlite] Fossil new mailing list doesn't seen to work

2019-02-22 Thread Domingo Alvarez Duarte
Hello ! I'm writing here because I've tried to create an account on fossil-scm.org and it doesn't seems to work. I fill in all the fields and then send the form, it refresh the screen and gives no feedback about what happened, it created the acount ? Then I try to login it says invalid user

[sqlite] Drop table error with existing views

2019-04-01 Thread Domingo Alvarez Duarte
Hello ! I'm using sqlite3 for a long time and I used to be able to drop tables that have views without error before but now it seems that it is not possible anymore. I mainly use it to restructure tables (add/move/remove fields) with something like this: PRAGMA foreign_keys=OFF; BEG

Re: [sqlite] Drop table error with existing views

2019-04-01 Thread Domingo Alvarez Duarte
Hello Graham ! Thank you so much ! With this pragma I can continue to solve my problem as before. Cheers ! On 1/4/19 12:42, Graham Holden wrote: PRAGMA legacy_alter_table=ON ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://

Re: [sqlite] importing a large TSV file

2019-04-01 Thread Domingo Alvarez Duarte
Hello Gert ! I normally do this (be aware that if there is a power outage the database is screwed): === PRAGMA synchronous = OFF; begin; --processing here commit; PRAGMA synchronous = ON; === Cheers ! On 1/4/19 13:14, Gert Van Assche wrote: Hi all, I need to create an SQLite db from

[sqlite] Fossil: ERROR: SQL error: no such table: ticketchng

2017-10-06 Thread Domingo Alvarez Duarte
Hello ! I'm using fossil and went through it's pages to have an overview of it and when viewing a ticket it shows this error message: ERROR: SQL error: no such table: ticketchng I had a problem before and Richard told me to issue a command that somehow upgraded the fossil database, this time

[sqlite] Patch to allow table alias for delete/update on sqlite3

2017-10-09 Thread Domingo Alvarez Duarte
Hello ! Here is a patch that can be applied to the sqlite3 trunk to allow the usage of table alias for delete/update operations. https://gist.github.com/mingodad/768b47903e54715e919e08b94c05804f Cheers ! ___ sqlite-users mailing list sqlite-users@m

[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 is

[sqlite] Fossil comunication and or test problems

2017-10-30 Thread Domingo Alvarez Duarte
Hello ! I'm writing this here on sqlite lists because I already sent a direct mail to Richard Hipp on 21/10/2017 and to fossil-scm lists on 23/10/2017 and no reply or action so far. Maybe there is a comunication problem preventing those emails reach the developers. The test problem is that

[sqlite] Why there is duplicated sha1 functions in sqlite3 sources ?

2017-11-15 Thread Domingo Alvarez Duarte
Hello ! I'm making a build of sqlite3 that includes sha1 and shathree and other extensions, then made some changes to makefiles (Makefile.in, main.mk) then when trying to run the tests I got an error "multiple definition of 'SHA1Transform'" when trying to link dbhash.c . Why is sha1 duplicat

[sqlite] Bug in unique index

2018-01-23 Thread Domingo Alvarez Duarte
Hello ! Maybe I found a bug in sqlite3 unique index, see example bellow: bug-unique.sql drop table if exists test; create table test(     id integer primary key,     v1 integer not null,     v2 integer not null constraint not_equal check(v1 != v2),     unique(v1, v2),     unique(v2, v1) );

[sqlite] HASHCODE 2018 in sqlite3

2018-03-05 Thread Domingo Alvarez Duarte
Hello ! I've been looking ath the HASHCODE 2018 competition and got interested on the problem proposition: Task Given a list of pre-booked rides in a city and a fleet of self-driving vehicles, assign the rides to vehicles, so that riders get to their destinations on time. For every ride tha

[sqlite] WISH LIST: macros on internal commands in sqlite3 executable

2018-03-06 Thread Domingo Alvarez Duarte
Hello ! While trying to abuse sqlite3 executable to write a complete application ( https://github.com/mingodad/sqlite3-hashcode-2018 ) I found that if the sqlite3 executable could allow the use of simple macros on it's internal commands would make it a lot more useful and easy. What I mean b

[sqlite] cannot connect to host www3.sqlite.org:443 (Connection refused)

2018-03-21 Thread Domingo Alvarez Duarte
Hello ! I'm getting this error when trying to update my sqlite3 repository, this message began some days ago and I was thinking that it was a temporary problem, but it seems it's not. Maybe some configuration changed on the sqlite servers ? Cheers ! _

[sqlite] Changes on sqlite3 parser and why not ?

2018-04-17 Thread Domingo Alvarez Duarte
Hello Richard ! Now that you are making changes on sqlite3 parser could you please add the table alias to delete/insert/update ? I already have it working and got conflicts with the latest changes, they are not big or complicated but it helps make some queries easier. Cheers ! fossil diff

[sqlite] When trying to compile with gcc is giving kind of infinit loop

2018-05-03 Thread Domingo Alvarez Duarte
Hello ! I'm experiencing a kind of compiler infinte loop when trying to compile sha1 extension (it seems like the macros problem for shathree). The compiler seems to enter an infinite loop. If I avoid using "asm" it compiles fine. #if __GNUC__ && (defined(__i386__) || defined(__x86_64__))

[sqlite] SQLite3 fossil repository not working ?

2018-05-08 Thread Domingo Alvarez Duarte
Hello ! Today I tried to update my sqlite3 repository but somehow it seems not working properly, I execute "fossil update" as usually and it contacts the server and exchange info with it but it only see till this commit http://www.sqlite.org/src/info/c381f0ea57002a264fd958b28e . There is mor

[sqlite] SQLite3 fossil repository problem solved

2018-05-08 Thread Domingo Alvarez Duarte
Hello ! I just retried again and now it got updated to the same content I can see on the web. Still it seems that there is more than one fossil server and they seem to lag from the main one. Cheers ! ___ sqlite-users mailing list sqlite-users@m

[sqlite] This list is getting spammed again

2018-05-08 Thread Domingo Alvarez Duarte
Hello Richard ! Again this list is getting spammed, I just received spam after publish. Cheers ! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Again sqlite repository servers out of sync ?

2018-05-14 Thread Domingo Alvarez Duarte
Hello Richard ! It's now several days that I'm seeing one thing on http://www.sqlite.org/src/timeline but when I try to update my cloned repository I get stuck with this: fossil update Autosync:  https://www3.sqlite.org/cgi/src Round-trips: 1   Artifacts sent: 0  received: 0 Pull done,

[sqlite] www3.sqlite.org ssl certificate expired

2018-05-17 Thread Domingo Alvarez Duarte
Hello Richard ! There is another problem with sqlite3 servers, this time it's the ssl certificate that has expired. Cheers ! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/s

[sqlite] Dont Repeat Yourself (DRY) and SQLite

2015-11-24 Thread Domingo Alvarez Duarte
Hello ! I'm trying to migrate a database from PostgreSQL to SQLite but could not find a way to do it and stay DRY, is it possible to do it ? See example bellow. Cheers ! == Using literals for one_type is not an acceptable option ! one_type varchar NOT NULL DEFAULT 'tuple' C

[sqlite] Dont Repeat Yourself (DRY) and SQLite

2015-11-24 Thread Domingo Alvarez Duarte
Actually we can not use "select"? on constraints ! Cheers ! > Tue Nov 24 2015 8:43:57 pm CET CET from "Igor Tandetnik" > Subject: Re: [sqlite] Dont Repeat Yourself (DRY) and >SQLite > > On 11/24/2015 2:09 PM, Domingo Alvarez Duarte wrote: > &

[sqlite] Dont Repeat Yourself (DRY) and SQLite

2015-11-25 Thread Domingo Alvarez Duarte
Dont Repeat Yourself (DRY) and >SQLite > > On 24 Nov 2015, at 7:09pm, Domingo Alvarez Duarte > wrote: > > >>one_type INTEGER NOT NULL REFERENCES mytype(id) NOT NULL, --how to use >> a default here ? >> > Include "DEFAULT 'tuple'" ju

[sqlite] Dont Repeat Yourself (DRY) and SQLite

2015-11-25 Thread Domingo Alvarez Duarte
This way we repeat the string everywhere then it's not DRY ! Cheers ! > Wed Nov 25 2015 11:38:50 am CET CET from "Simon Slavin" > Subject: Re: [sqlite] Dont Repeat Yourself (DRY) and >SQLite > > On 24 Nov 2015, at 11:24pm, Domingo Alvarez Duarte > wrote

[sqlite] Magic number in sqlite source code

2015-09-03 Thread Domingo Alvarez Duarte
Hello ! I was looking at this particular commit https://www.sqlite.org/src/info/0ea6e5c9fc6b1dd1 then I realize the usage of magic number through sqlite3 source code like the one bellow, it's not good practice to avoid then ? Cheers ! = case PragTyp_STATS: { static const char *azCol

[sqlite] Changes to create index on trunk is breaking old code

2015-09-04 Thread Domingo Alvarez Duarte
Hello ! I'm testing sqlite3 trunk on existing code and noticed that the changes to "create index" using expressions/functions is breaking on old databases. It seems that because I used the field name single quotes now it's considering it an expression. On an old database I have the followi

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
Hello ! After fix the index issues using an old sqlite3 executable (the trunk refuse to work on indexes created with single quotes on field names) I'm getting ocasionaly memory errors when using fts3/4 searches, see error below: free(): corrupted unsorted chunks: 0x7fa3a01073a0 ? Ch

[sqlite] Changes to create index on trunk is breaking old code

2015-09-04 Thread Domingo Alvarez Duarte
fixed on trunk. Cheers ! > Fri Sep 04 2015 3:40:18 pm CEST CEST from "Dominique Devienne" > Subject: Re: [sqlite] Changes to create index on >trunk >is breaking old code > > On Fri, Sep 4, 2015 at 2:54 PM, Richard Hipp wrote: > > >>On 9/4/1

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
k error with old >database with fts3/4 > > On 09/04/2015 07:35 PM, Domingo Alvarez Duarte wrote: > >>Hello ! >> >> After fix the index issues using an old sqlite3 executable (the trunk >>refuse >> to work on indexes created with single quotes on field

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
_release:stmt:%s\n", sqlite3_sql(statement)); ??? sqlite3_finalize(statement); ??? count++; ??? } ??? if (count) return sq_throwerror(v, _SC("closing database with %d statements not closed."), count); ? > Fri Sep 04 2015 4:18:01 pm CEST CEST from &quo

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
sql(statement)); ??? sqlite3_finalize(statement); ??? count++; ??? } ? > Fri Sep 04 2015 4:33:13 pm CEST CEST from "Dan Kennedy" > Subject: Re: [sqlite] SQLite3 trunk error with old >database with fts3/4 > > On 09/04/2015 09:18 PM, Domingo Alvarez Duarte wrote: >

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
etect it and skip it ? Or any way to safely have a central point to do a cleanup ? Cheers ! > Fri Sep 04 2015 4:44:02 pm CEST CEST from "Dan Kennedy" > Subject: Re: [sqlite] SQLite3 trunk error with old >database with fts3/4 > > On 09/04/2015 09:29 PM, Domingo Alvarez Du

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
a lot for your help ! > Fri Sep 04 2015 4:57:57 pm CEST CEST from "Domingo Alvarez Duarte" > Subject: Re: [sqlite] SQLite3 trunk error with >old database with fts3/4 > > Hello ! > > I did something similar to your sugestion (sqlite3_next_stmt(db, NULL))? &

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
Hello again ! I think that would be interesting to have functions similar to sqlite3_next_stmt/sqlite3_finalize for extensions something like this: sqlite3_next_extension / sqlite3_finalize_extension ? Cheers ! > Fri Sep 04 2015 5:13:23 pm CEST CEST from "Domingo Alvare

[sqlite] SQLite3 trunk error with old database with fts3/4

2015-09-04 Thread Domingo Alvarez Duarte
e] SQLite3 trunk error with old >database with fts3/4 > > On 09/04/2015 10:13 PM, Domingo Alvarez Duarte wrote: > >>Hello again ! >> >> I looked at the documentaion again and realized that I was alread calling >> sqlite3_close_v2 the I commented out all of th

[sqlite] Changes to create index on trunk is breaking old code

2015-09-04 Thread Domingo Alvarez Duarte
? ? Example: sqlite3 a_db_that_uses_malformed_sql.db -- warning -- use of single quotes on field names are not standard -- the_index_table_has_the_problem sqlite3> ? Cheers ! ? > Fri Sep 04 2015 11:40:11 am CEST CEST from "Domingo Alvarez Duarte" >

[sqlite] First test of json and index expressions, not so good

2015-09-04 Thread Domingo Alvarez Duarte
Hello ! This is my first test with json and index expressions ! How to make usage of the expression index on queries ? Why is json_extract so slow ? Cheers ! Output Time to insert??? 5000??? 0.032227??? records by second = ??? 155149 count=??? 4999 json=??? the_value_1 ???

[sqlite] First test of json and index expressions, not so good

2015-09-04 Thread Domingo Alvarez Duarte
Hello ! Here is the database dump with 50 records: PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE json_tbl(id integer primary key, json text collate nocase); INSERT INTO "json_tbl" VALUES(1,'{"id" : 1, "value" : "the_value_1"}'); INSERT INTO "json_tbl" VALUES(2,'{"id" : 2, "value" :

[sqlite] First test of json and index expressions, not so good

2015-09-04 Thread Domingo Alvarez Duarte
Hello again ! Well it's slow partly because of the linear scan but there are not too many records 5000. I also tried with "indexed by" but: ___ sql = "select? json_extract(json, '$.value') AS val? from json_tbl indexed by json_tbl_idx where val = ?;"; showPlan(); ? AN ERROR HA

[sqlite] Second test of json and index expressions, not so good

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! I was not been fair with my raw select against json_extract now I'm doing it one by one and the difference with json_extract is basically none. But I still could not manage to use the index expression to speedup the query. __Output Time to insert??? 5000??? 0.03179??? re

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
Hello again ! I was trying to use the alias in the where clause hopping sqlite would be smart enough to recognize it and use the index but that doesn't happen. So I tried again repeating the expression instead of using the alias and now sqlite recognize the index and run very fast. Would b

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! > I really wish there was a way for me to fix this historical > permissiveness in SQLite without breaking millions of (miscoded) > iPhone/Android apps. I'd do so if I could. > -- > > ? > > What about the warning messages to stderr through sqlite3 when opening databases with invalid

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
e_value_33' = json_extract(json, '$.value'); EXPLAIN QUERY PLAN SELECT * FROM json_tbl_value_view WHERE 'the_value_33' = val; EXPLAIN QUERY PLAN WITH RECURSIVE above33 AS (SELECT * FROM json_tbl WHERE id > 33) SELECT * FROM above33 WHERE json_extract(json,

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
Cheers ! > Sat Sep 05 2015 11:16:26 am CEST CEST from "Simon Slavin" > Subject: Re: [sqlite] Third test of json and index >expressions, now it works > > On 5 Sep 2015, at 10:07am, Domingo Alvarez Duarte > wrote: > > >>What about the warning messages t

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
alue_33' = json_extract(json, path); COMMIT; _____ > Sat Sep 05 2015 6:35:08 am CEST CEST from "Richard Hipp" >Subject: Re: [sqlite] Third test of json and index expressions, now it works > > On 9/4/15, Domingo Alvarez Duarte wrote: > > >>Would

[sqlite] UNQL as an extension to sqlite3 and now could use index expressions

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! I did for one project a kind of sqlite3 extension using UNQL (http://unql.sqlite.org/index.html/wiki?name=UnQL) it has some flaws (and I did some bug fixes) like only performing linear scan on collections, but now with index expressions support on sqlite3 it could be revived back with in

[sqlite] First test of json and index expressions, not so good

2015-09-05 Thread Domingo Alvarez Duarte
> > Em 04/09/2015 17:09, "Domingo Alvarez Duarte" > escreveu: > > >>Hello ! >> >> This is my first test with json and index expressions ! >> >> How to make usage of the expression index on queries ? >> >> Why is json_extra

[sqlite] UNQL as an extension to sqlite3 and now could use index expressions

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! And here is the database dump for the example: ___ PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE users(id INTEGER PRIMARY KEY, name TEXT, json_misc TEXT); INSERT INTO "users" VALUES(1,'Domingo','{"color":"cyan", "has_eyes": true}'); CREATE TABLE "unql_users"(x);

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
egory as manifest typing, where a more liberal > approach is an improvement? > > > On Fri, Sep 4, 2015 at 9:35 PM, Richard Hipp wrote: > > >>On 9/4/15, Domingo Alvarez Duarte wrote: >> >> >>>Would be nice to sqlite be able to recognize aliases

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! Although your explanation is interesting it doesn't seems to be correct: First of all there is no point to to do anything if the whole sql statement is no correct. I mean: - If there is any reference to inexistent columns/functions/tables/views - If any expression is not vali

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! Again your proposition doesn't stand up ! There is no "waste of cpu cycles" for work that is not done, I mean for the ones that write queries for the machine instead to the humans, they will continue to have the same results (less parsing steps, besides the parsing normally accounts t

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
Hello ! It seems that you mix apples to oranges and try to compare then. One thing is formal grammar/syntax and the other is implementation/optimization/execution. The fact that sqlite does things in one way now do not mean it's the best/definitive way of implement things and that can be c

[sqlite] Third test of json and index expressions, now it works

2015-09-05 Thread Domingo Alvarez Duarte
ird test of json and index expressions, now it works > > On 2015-09-05 08:58 PM, Domingo Alvarez Duarte wrote: > >>Hello ! >> >> Again your proposition doesn't stand up ! >> > Again? > That was my first post on the subject and it was in reply to

[sqlite] Second test of json and index expressions, not so good

2015-09-06 Thread Domingo Alvarez Duarte
Hello ! That's awesome ! We can write cleaner queries with this. Thank you so much ! Cheers ! > Sun Sep 06 2015 12:39:03 am CEST CEST from "Richard Hipp" > Subject: Re: [sqlite] Second test of json and index >expressions, not so good > > On 9/4/15,

[sqlite] Cloning sqlite3 repository make not working

2015-09-07 Thread Domingo Alvarez Duarte
Hello ! I just cloned a fresh sqlite3 repository from https://github.com/mackyle/sqlite and after executing "./configure --disable-amalgamation; make" I'm get this error on ubuntu 14.04: make: *** No rule to make target `/home/mingo/dev/dadbiz++/third-party/sqlite3-git/manifest.uuid', needed

[sqlite] Cloning sqlite3 repository make not working

2015-09-07 Thread Domingo Alvarez Duarte
Hello ! Here is the parser code for the "SQL PROCEDURE" anyone have any comment on it ? _ / The SQL PREPARE statement / %ifndef SQLITE_OMIT_SQL_PREPARED cmd ::= create_prepared.? {sqlite3SqlPreparedFinishParse(pParse,0, 0);} cmd :

[sqlite] Function lower on index expressions not allowed ?

2015-09-07 Thread Domingo Alvarez Duarte
Hello ! I'm converting a database from postgresql and when I tried to create this index it fails: CREATE UNIQUE INDEX country_name_idx on country(lower(name)); Error: "non-deterministic functions prohibited in index expressions" Can the lower function be non deterministic ? I know th

[sqlite] Function lower on index expressions not allowed ?

2015-09-08 Thread Domingo Alvarez Duarte
ndex expressions >not allowed ? > > On 9/7/15, Domingo Alvarez Duarte wrote: > >>Hello ! >> >> I'm converting a database from postgresql and when I tried to create this >> index it fails: >> >> CREATE UNIQUE INDEX country_name_idx on countr

[sqlite] To the sqlite wish list

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! Sqlite is really a very nice piece of software and it could even be better, here is things to add to the wish list: - Implement sql "CREATE FUNCTION" even if it is as simple of only allowing a limited set of operations, refactoring the actual trigger implementation to allow it be call

[sqlite] To the sqlite wish list, sqldiff, data sync

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! I forgot to include this topics on my wish list: Sqldiff is an amazing tool added to sqlite, but it can be even more useful if it's integrated on sqlite itself, right know sqldiff needs two databases to operate, but if included in sqlite3 somehow it could generate the diffs on the go

[sqlite] To the sqlite wish list, usefull internal/extensions as library

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! Sqlite like any other project has developed a lot of cross platform/utilities code but most of it remain locked down to sqlite3 alone. Example the latest json1 functions, vfs, sqlite3_printf, thread/lock management functions, ..., would be nice if they could also be used by the sqlite

[sqlite] Help with ext/misc/regex.c extension

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! I'm trying to add a new option to ext/misc/regex.c it's "\p()" that's like the LUA operator "%b" %b/xy/, where /x/ and /y/ are two distinct characters; such item matches strings that start with?/x/, end with?/y/, and where the /x/ and /y/ are /balanced/. This means that, if one reads

[sqlite] Help with ext/misc/regex.c extension

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! Now I realize that in the function re_balanced I also need restore the ReInput back in case of not matching: ___ static int re_balanced( ??? ReInput *p, ??? int cb, /* char that opens a balanced expression */ ??? int ce? /* char that closes a balanced expression */ ){ ? int c =

[sqlite] Command line sqlite3 program bug

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! After seem several emails from a user asking about how to use sqlite3 through shell scripts, I remember my experiences with sqlite3 but didn't mind to report it, but now I think that it's worth mention it because it'll hurt several users. The bug/problem is that the sqlite3 command li

[sqlite] Fwd: OT: Oracle functions for SQlite

2015-09-08 Thread Domingo Alvarez Duarte
Hello ! It's nice that you shared this, probably if you also host/mirror the on github you'll get an even broader audience and probably feedback and enhancements. I suggest to to fork this project https://github.com/mackyle/sqlite it's almost daily updated with the https://www.sqlite.org and

[sqlite] Command line sqlite3 program bug

2015-09-08 Thread Domingo Alvarez Duarte
----------- > On 9/8/2015 9:54 AM, Domingo Alvarez Duarte wrote: > >>Hello ! >> >> After seem several emails from a user asking about how to use sqlite3 >>through >> shell scripts, I remember my experiences with sqlit

[sqlite] Third test of json and index expressions, now it works

2015-09-09 Thread Domingo Alvarez Duarte
Hello ! Nice explanation ! With your knowledge could you give your view about how evaluation of calculated/function columns should be done to have correct results. Like another example given on other thread: _ CREATE TABLE a(b); INSERT INTO a(b) VALUES(1),(2),(3); SELEC

[sqlite] Third test of json and index expressions, now it works

2015-09-09 Thread Domingo Alvarez Duarte
Hello ! This fix the example I gave on the other email it was "r <> r" but it's more easy to see the problem with "r = r". Nice explanation ! With your knowledge could you give your view about how evaluation of calculated/function columns should be done to have correct results. Like ano

[sqlite] Lovefield a new javascript sql engine from google

2015-09-10 Thread Domingo Alvarez Duarte
Hello ! I think that this can be of interest for some sqlite users https://google.github.io/lovefield/ . Cheers !

[sqlite] Feedback request: JSON support in SQLite

2015-09-11 Thread Domingo Alvarez Duarte
Hello ! I'm looking at these new extensions/functions and noticed that from scripting languages to be able to use sqlite3_value_subtype we'll need access to sqlite3_context parameters by index, because from the scripting language once we are called there is no easy way from the script to refer t

[sqlite] Feedback request: JSON support in SQLite

2015-09-11 Thread Domingo Alvarez Duarte
Hello ! That's what json_extract does ! json_extract('[2,3,4,5,6]', '$[3]'); --> returns 5; Cheers ! > Fri Sep 11 2015 8:40:36 pm CEST CEST from "Nelson, Erik - 2" > Subject: Re: [sqlite] Feedback request: >JSON support in SQLite > > Richard Hipp wrote on Friday, September 11, 2015 11

[sqlite] Feedback request: JSON support in SQLite

2015-09-12 Thread Domingo Alvarez Duarte
Hello ! I did some tests to see how the json* functions behave when we specify collation to the column that stores it and it seems that the json* functions ignore the collation completely, is that by design or is it a forgotten implementation ? ___ CREATE TABLE a(j collate nocase); INS

[sqlite] Feedback request: JSON support in SQLite

2015-09-12 Thread Domingo Alvarez Duarte
Hello ! Looking at the documentation of json* functions and after see the example given for a query on a field mixed owith string and json_array: ___ SELECT name FROM user WHERE phone LIKE '704-%' UNION SELECT user.nameFROM user, json_each(user.phone) WHERE json_valid(user.phone)

[sqlite] Third test of json and index expressions, now it works

2015-09-13 Thread Domingo Alvarez Duarte
Hello ! Thank you for the good example and explanation ! Cheers ! > Sun Sep 13 2015 2:06:14 am CEST CEST from "James K. Lowden" > Subject: Re: [sqlite] Third test of json and >index expressions, now it works > > On Wed, 09 Sep 2015 09:56:12 +0200 > &qu

[sqlite] Fwd: OT: Oracle functions for SQlite

2015-09-13 Thread Domingo Alvarez Duarte
Hello ! Due the way sqlite manages it's source code (with fossil-scm) I propose to anyone that has any extension/custom sqlite code fork this project on github: https://github.com/mackyle/sqlite And publish it there. Cheers ! > Sun Sep 13 2015 6:42:27 am CEST CEST from "Charles Leifer

[sqlite] Third test of json and index expressions, now it works

2015-09-13 Thread Domingo Alvarez Duarte
Hello ! Thank you for all feedbacks to this problem ! I originally gave a wrong/difficult example, the original one that other gave here use the equality operator instead of inequality. ___test-random.sql create table a(a); insert into a values (1),(2),(3); select 'direct select ='

[sqlite] Bug in SQLite 3.8.11.1 source code

2015-09-14 Thread Domingo Alvarez Duarte
Hello ! This is a real simple bug fix but it seems that no one is caring about it !!! Cheers ! > Sat Sep 12 2015 8:52:04 pm CEST CEST from "chris0e3" >Subject: [sqlite] Bug in SQLite 3.8.11.1 source code > > Hello, > > I was just looking at updating to SQLite 3.8.11.1 when I spotted wha

[sqlite] How to cast and get column type ?

2015-09-16 Thread Domingo Alvarez Duarte
Hello ! I'm writing an application that uses the column declared/type to do some formatting, it's working fine for tables and most views except when the column is calculated like: SELECT id, name, (weight / height) AS pseudo_mass? FROM people; I can get the column type of "id" and "name" b

[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

[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] FTS5 problem ? more than 3,000 queries !

2016-04-04 Thread Domingo Alvarez Duarte
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

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
fy sqlite3 using indexes and my application not using then. Cheers ! > Mon Apr 04 2016 10:59:17 AM CEST from "Simon Slavin" > Subject: Re: [sqlite] Difference between sqlite3 >executable and application > > On 4 Apr 2016, at 9:53am, Domingo Alvarez Duarte > wrote: >

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
ot;Simon Slavin" > Subject: Re: [sqlite] Difference between sqlite3 >executable and application > > 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 re

[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 Ap

[sqlite] Difference between sqlite3 executable and application

2016-04-04 Thread Domingo Alvarez Duarte
code>? AND post_code Mon Apr 04 2016 12:39:35 PM CEST from "Simon Slavin" > Subject: Re: [sqlite] Difference between sqlite3 >executable and application > > On 4 Apr 2016, at 10:47am, Domingo Alvarez Duarte > wrote: > > >>It would be a gross mistake

[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] 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
be done lazy so if no violations occur no hash table is ever created. The actual situation is better than nothing but it's still frustrating ! Cheers ! > Mon Apr 04 2016 07:39:19 PM CEST from "Clemens Ladisch" > Subject: Re: [sqlite] FOREIGN KEY constraint failed

  1   2   3   >