[sqlite] Bug in sqlite3_trace/trigger/delete

2015-08-05 Thread sqlite-mail
c_id) REFERENCES > ac(id), -- here we have the comma separating a constraint > CONSTRAINT constrained_fkey_ad_id FOREIGN KEY(d_id) REFERENCES ad(id) > ); > > COMMIT; > > - > > Thanks in advance for your time and attention ! > > Mon Aug 03 2015 13:08:08 CES

[sqlite] Bug in sqlite3_trace/trigger/delete

2015-08-05 Thread sqlite-mail
(d_id) REFERENCES ad(id) CONSTRAINT constrained_fkey_ad_id FOREIGN KEY(d_id) REFERENCES ad(id) ); COMMIT; - > Wed Aug 05 2015 12:16:09 CEST from "sqlite-mail" > Subject: Re: [sqlite] Bug in >sqlite3_trace/trigger/delete > > >>Hello ! >>

[sqlite] Bugs/improvements to sqlite constraints

2015-08-06 Thread sqlite-mail
Hello ! After submitting several emails with subject "Bug in sqlite3_trace/trigger/delete" and only one reply to then so far I decided to look a bit more deep on the problem I'm facing using sqlite3 with one specific database and created a simpler database that can show several problems and

[sqlite] Bug in sqlite3_trace/trigger/delete

2015-08-06 Thread sqlite-mail
ype 0|0|0|SCAN TABLE account_account_template 0|0|0|SCAN TABLE account_account_template 0|0|0|SCAN TABLE account_account 0|0|0|SCAN TABLE account_account - > Fri Jul 31 2015 15:34:56 CEST from "sqlite-mail" > Subject: [sqlite] Bug in >sqlite3_trace/trigger/delete > > H

[sqlite] Patch that add ".dumpdata" command to shell.c

2015-08-11 Thread sqlite-mail
Hello ! Here is a small patch that adds ".dumpdata" for "shell.c" in sqlite3. This command should behave exactly like ".dump" but without the database schema. I 'm giving it with the same license as sqlite. Cheers !

[sqlite] Patch that add ".dumpdata" and "BEGIN TRANSACTION; " command to shell.c

2015-08-12 Thread sqlite-mail
Hello again ! After sending the first patch I also realized that when sqlite3 dumps ".schema" or ".fullschema" it doesn't surround the dump with a transaction and that takes longer and makes the hard disk work hard. So I also surrounded ".schema" and ".fullschema" with a transaction with this

[sqlite] Small bug in ".dump", ".schema" and ".fullschema"

2015-08-12 Thread sqlite-mail
Hello ! Working with sqlite3 I noticed that sqlite3 ".dump", ".schema" and ".fullschema" outputs the contents of the field "sql" stored in "sqlite_master" and if the sql statement ends with a comment the resulted dump will be invalid see example: === valid sql statement stored on

[sqlite] Database sybchronisation

2015-08-13 Thread sqlite-mail
Hello ! ? This request is a common requirement and in my opinion would be better solved by an extension to the actual sqlite3 api functions. ? Actually there is sqlite3_trace that can be used to watch all sql statements executed on a given session. ? One possible way would be to

[sqlite] Patch to add sqlite3_trace_v2

2015-08-14 Thread sqlite-mail
Hello ! After seem the question about "how to sync sqlite3 databases" and proposed the creation/extension of sqlite3_trace function to make it easy to log changes to the database I implemented what I'll call sqlite3_trace_v2 that has an extra parameter to indicate if we only want to log sql

[sqlite] Enhance the SELECT statement?

2015-08-17 Thread sqlite-mail
Hello ! The query you mention is not the same as: INSERT INTO table_of_intergers SELECT seqno FROM generate ORDER BY seqno; Cheers ! > Mon Aug 17 2015 17:44:58 CEST from "John McKown" > Subject: [sqlite] Enhance the SELECT >statement? > > I use both SQLite3 and PostgreSQL. One thing

[sqlite] ATTACH DATABASE statement speed

2015-08-18 Thread sqlite-mail
Hello ! Do you have foreign keys on your tables ? And if so do you have indexes on then ? A database with foreign keys and no indexes can run very slow for mas insert/update/delete ? Cheers ! ? > Tue Aug 18 2015 12:38:51 CEST from "Paolo Bolzoni" > Subject: Re: [sqlite] ATTACH

[sqlite] ATTACH DATABASE statement speed

2015-08-19 Thread sqlite-mail
is performed on all dependent tables and that can be a lot time consuming depending on the number of records on then. ? I've got this problem on a heavily foreign key constrained database and it took me a bit to realize that ! Cheers ! > @nameless person known as sqlite-mail, > Yes, I d

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread sqlite-mail
Hello ! Does anybody knows how to rename a table and all it's dependencies in one go ? ? The problem: a database has several tables and views that reference/use other tables something simplified like this: CREATE TABLE a(id integer primary key, name text); CREATE TABLE

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread sqlite-mail
Hello ! Here I'm fixing some typos and I also tested on postgresql and there all views are updated properly then I'll say is a bug in sqlite. Does anybody knows how to rename a table and all it's dependencies in one go ? ? The problem: a database has several tables and views that

[sqlite] Is this a bug ? Pragmas do not accept qualified names !

2015-08-21 Thread sqlite-mail
Hello ! Today I'm working with sqlite3 with attached databases and when I tried to get info about a tbale using "PRAGMA TABLE_INFO" I discovered that pragmas do not work with qualified/prefixed names like: PRAGMA table_info(attached_db.one_table) ? Is this a bug ? Cheers !

[sqlite] Is this a bug ? Pragmas do not accept qualified names !

2015-08-21 Thread sqlite-mail
t; > On Fri, Aug 21, 2015 at 7:35 AM, sqlite-mail > wrote: > > >>Hello ! >> >> Today I'm working with sqlite3 with attached databases and when I tried to >> get info about a tbale using "PRAGMA TABLE_INFO" I discovered that pragma

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread sqlite-mail
Then do you think this is a bug ? > Fri Aug 21 2015 18:57:33 CEST from "Simon Slavin" >Subject: Re: [sqlite] Is this a bug ? How to rename a table and all >dependencies ? > > On 21 Aug 2015, at 12:20pm, sqlite-mail wrote: > > >>Does anybody kno

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread sqlite-mail
dependencies ? > > On Fri, Aug 21, 2015 at 10:04 AM, sqlite-mail >wrote: > >>Then do you think this is a bug ? >> >>>Fri Aug 21 2015 18:57:33 CEST from "Simon Slavin" >>> Subject: Re: [sqlite] Is this a bug ? How to rename a table and

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread sqlite-mail
d Hipp" >Subject: Re: [sqlite] Is this a bug ? How to rename a table and all >dependencies ? > > On 8/21/15, sqlite-mail wrote: > >>Then do you think this is a bug ? >> > The word "bug" means it gets the wrong answer. > > The absenc

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread sqlite-mail
That's why I think that expose a basic SQL ANSI catalog would make this kind of work and others a lot easier. ? > Fri Aug 21 2015 22:13:00 CEST from "Simon Slavin" >Subject: Re: [sqlite] Is this a bug ? How to rename a table and all >dependencies ? > > On 21 Aug 2015, at 9:07pm, Scott

[sqlite] There is any reason to sqlite not expand "*" in function calls ?

2015-08-22 Thread sqlite-mail
Hello ! I'm testing the new json functions and when I tried this: select json_array(*) as json from one_table; I've got : [] [] .. Then I tried with some custom functions accepting variable number of parameters and realize that "*" is not expanded for function calls. There

[sqlite] There is any reason to sqlite not expand "*" in function calls ?

2015-08-22 Thread sqlite-mail
eric user defined functions. Anyone have any idea about this ? ? Cheers ! ? > Sat Aug 22 2015 13:01:32 CEST from "Richard Hipp" >Subject: Re: [sqlite] There is any reason to sqlite not expand "*" in >function calls ? > > On 8/22/15, sqlite-m

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
Hello ! When querying views sqlite shows qualified column names if they are specified individually. Is this the expected result or a bug ? This behavior breaks some of my code that uses column names for other purposes. Cheers ! output of "test-view-alias" SQL: SELECT a.* FROM

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
e Aug 25 2015 19:45:27 CEST from "Simon Slavin" >Subject: Re: [sqlite] Why sqlite show qualified column names when selecting >from views ? > > On 25 Aug 2015, at 6:13pm, sqlite-mail wrote: > > >>When querying views sqlite shows qualified column names if they

[sqlite] Bug in sqlite3_trace/trigger/delete

2015-07-31 Thread sqlite-mail
Hello? ! ? I'm using sqlite for a project and with this specific database https://dev.dadbiz.es/tmp/odoo.db.zip (12MB compressed / 38MB uncompressed) this is happening: ? -1 Registering an sqlite3_trace function when trying to delete a record just inserted on the table "res_users" the registered