Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-11-01 Thread Bernardo Sulzbach
> > I don't think that explanation holds water. > I don't have proof that I am correct, but you can try to test my hypothesis the following way: Let there be 4 databases: -- f1.db create table t(a real unique); insert into t values(9223372036854775807.0); -- f2.db create table t(a real unique);

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-10-31 Thread Bernardo Sulzbach
It is not a bug AFAIK. SQLite uses what the documentation calls dynamic typing for its actual values. So if you are inserting integers into a real column, you are going to store integers. However, when you select from it they are presented as reals and mix up (looking as if there were duplicates, e

Re: [sqlite] Change name part of a JSON object

2018-03-31 Thread Bernardo Sulzbach
On 03/31/2018 09:58 AM, Robert M. Münch wrote: A hack would be to search & replace “Untitled“: with the new name… but might be dangerous… any better idea? Unless you are certain that the text you are replacing cannot occur anywhere else, this is asking for problems. ___

Re: [sqlite] Uninitialized memory reads (not likely false positives)

2016-11-15 Thread Bernardo Sulzbach
On 11/15/2016 08:53 PM, Nico Williams wrote: Another one that I find difficult to analyze is a possible out-of-bounds read in vdbeSorterCompareInt(): 85712 static const u8 aLen[] = {0, 1, 2, 3, 4, 6, 8 }; 85713 int i; 85714 res = 0; 85715 for(i=0; i0 && s1<7)

Re: [sqlite] VACUUM causes Out of memory error

2016-11-02 Thread Bernardo Sulzbach
On 11/02/2016 05:18 PM, Christian Czech wrote: It is a fundamental bug. I hope one day it gets fixed. Otherwise 3.15.0 is useless. It has been fixed: http://www.sqlite.org/src/info/3028845329c9b7ac -- Bernardo Sulzbach http://www.mafagafogigante.org/ mafagafogiga...@gmail.com

Re: [sqlite] Strange thing!

2016-10-28 Thread Bernardo Sulzbach
ite are handled as if MATCH SIMPLE were specified". I think this is the issue you are facing. -- Bernardo Sulzbach http://www.mafagafogigante.org/ mafagafogiga...@gmail.com ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mai

Re: [sqlite] A possible double bug?

2016-10-17 Thread Bernardo Sulzbach
should behave the same way on all systems, according to that statement. -- Bernardo Sulzbach http://www.mafagafogigante.org/ mafagafogiga...@mafagafogigante.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.

Re: [sqlite] A possible double bug?

2016-10-17 Thread Bernardo Sulzbach
be. fabs(a - b) is the simplest way to have an idea of how close two values are, and dividing by the magnitude of one of them (after checking that it is not zero, etc.) afterwards is also a good idea in some cases. -- Bernardo Sulzbach http://www.mafagafogigante.org/ mafagafogiga

Re: [sqlite] Q about integer overflow in sqlite3MulInt64().

2016-09-20 Thread Bernardo Sulzbach
using a division of the maximum possible value by the multiplier (which will never overflow). -- Bernardo Sulzbach http://www.mafagafogigante.org/ mafagafogiga...@mafagafogigante.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http

Re: [sqlite] Q about integer overflow in sqlite3MulInt64().

2016-09-20 Thread Bernardo Sulzbach
AICT. Unless performance is of uttermost importance, just try and see if it fails or not. prod = x * y; if (y != 0) { if (prod / y != x) { /* Overflow. */ } } This also works for multiplications such as 1152921504606846976 * 3, which do not overflow, but have much bigger multiplicands

[sqlite] IS a SQLite db of small size as good as reliable cache?

2016-02-04 Thread Bernardo Sulzbach
I don't really care about all the MS hate, but will add mine[1]. I am not a participant of that question, but it shows the same problem. I had over 50% CPU usage for hours when the computer was "idle" because Windows was indexing my stuff, forever. A friend of mine had the same problem and after c

[sqlite] hard links and SQLite

2016-01-11 Thread Bernardo Sulzbach
> What have folks here done to avoid the race condition originally described? > I?ve seen some documentation of SQLite and hard links but Your message appears to be truncated. What if you move the hard link creation part to right after the commit?

[sqlite] whish list for 2016

2016-01-04 Thread Bernardo Sulzbach
Thanks a lot for this, Stephen. It will very likely help me make a decision in the future.

[sqlite] whish list for 2016

2016-01-04 Thread Bernardo Sulzbach
On Mon, Jan 4, 2016 at 1:50 PM, Stephen Chrzanowski wrote: > > I did the test to compare SSD vs 5200rpm and 7200rpm drives. I should > throw this at my 7200rpm hybrid at this app and see what happens. > Could you please share any performance data you still have? Thank you.

[sqlite] whish list for 2016

2016-01-04 Thread Bernardo Sulzbach
base in just a > few hours. > > Simon. You wouldn't have monitored disk usage of that, would you? I am curious about how faster a good SSD would make it as it clearly doesn't look like a CPU or memory bound operation. -- Bernardo Sulzbach

[sqlite] whish list for 2016

2015-12-25 Thread Bernardo Sulzbach
field. >> > > RENAME exists. > > ALTER TABLE table-name RENAME COLUMN column_field_name TO > new_column_field_name; > Are you sure? The documentation does not have anything about this and I get a syntax error using 3.9.2 (a bit outdated, I know). Anyway, if you are right, the documentation likely should be updated. -- Bernardo Sulzbach

[sqlite] whish list for 2016

2015-12-24 Thread Bernardo Sulzbach
ood catch, you cannot place it wherever you want, but alter table is currently capable of "directly adding a field". -- Bernardo Sulzbach

[sqlite] whish list for 2016

2015-12-24 Thread Bernardo Sulzbach
On Thu, Dec 24, 2015 at 3:10 PM, Richard Damon wrote: > On 12/24/15 10:26 AM, Bernardo Sulzbach wrote: >> >> I think you focused too much on the ordering issue. He or she may > just >> want a more versatile alter table for convenience. However, I > > > don

[sqlite] wish list for 2016

2015-12-24 Thread Bernardo Sulzbach
On Thu, Dec 24, 2015 at 2:30 PM, Tim Streater wrote: > On 24 Dec 2015 at 15:26, Bernardo Sulzbach > wrote: > >> want a more versatile alter table for convenience. However, I don't >> know if alter table is used at all in production anywhere (why would >> it b

[sqlite] whish list for 2016

2015-12-24 Thread Bernardo Sulzbach
oo far from necessary (from my standpoint) to be worthy of the developers' time. -- Bernardo Sulzbach

[sqlite] Problem with accumulating decimal values

2015-12-16 Thread Bernardo Sulzbach
s money going away {round down as many times as possible} if it is money coming our way {round up as many times as possible}. I think many other places will use this too. -- Bernardo Sulzbach

[sqlite] Problem with accumulating decimal values

2015-12-16 Thread Bernardo Sulzbach
very pedantic, but just to be clear. I like integer better than floating points and text for currencies, some will have other preferences, it does not really matter as long as we are not working together. -- Bernardo Sulzbach

[sqlite] Running Sqlite on 64-bit/Client-server data base

2015-12-15 Thread Bernardo Sulzbach
mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Bernardo Sulzbach

[sqlite] Problem with accumulating decimal values

2015-12-12 Thread Bernardo Sulzbach
On Sat, Dec 12, 2015 at 6:51 AM, Darren Duncan wrote: > > Per another suggestion, the best workaround is to use an INTEGER type > instead, and store an even multiple of whatever your smallest currency unit > size is, eg cents rather than dollars. > As I understood, he is doing the math in Python

[sqlite] Problem with accumulating decimal values

2015-12-11 Thread Bernardo Sulzbach
Looks like you thought you could have a DECIMAL type (such as MySQL DECIMAL) here. But SQLite does not allow for this. My workaround usually is: create table accounts(account_number integer, balance integer); create view accounts_view as select account_number, balance / 100.0 from account

[sqlite] Problem with accumulating decimal values

2015-12-11 Thread Bernardo Sulzbach
Hi Frank, You want to store an INTEGER type using the lowest used unit (cents or mills). This page https://www.sqlite.org/datatype3.html may be of assistance next time -- Bernardo Sulzbach

[sqlite] website documentation wording

2015-12-06 Thread Bernardo Sulzbach
e emphasizes that all managers decided something. -- Bernardo Sulzbach

[sqlite] website documentation wording

2015-12-04 Thread Bernardo Sulzbach
id > SQL--sequel become SQL--ess queue ell? I always remember it as being > sequel, and it rolls off the tongue easier. And as sequel, it would be "a > SQLite". > > Happy Holidays, all. > dvn > > On Thu, Dec 3, 2015 at 3:41 PM, Bernardo Sulzbach gmail.com >

[sqlite] website documentation wording

2015-12-03 Thread Bernardo Sulzbach
rd "of". > > -- > ---> Dirk Jagdmann > > http://cubic.org/~doj > -> http://llg.cubic.org > ___ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Bernardo Sulzbach

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread Bernardo Sulzbach
I understand Smith's point. But when I am sure that some schema is going to stay in SQLite for the foreseeable future, I like using text. It is simple, adequate, and expresses my intent completely: TEXT. That's what the column has, TEXT, not 40, not 60, not less than 30, just freaking text. Lastly

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Bernardo Sulzbach
e about the change. However, it is easier on the eyes (at least mine) to see TEXT used with SQLite queries. -- Bernardo Sulzbach

[sqlite] SQLiteman crashed

2015-11-28 Thread Bernardo Sulzbach
Spam filters went mad on you. Consider using a better email address / name. Dr. Hipp saved the thread. I think that http://sqliteman.yarpen.cz/ may be what you are looking for. Try contacting petr at yarpen.cz

[sqlite] Warnings for non-deterministic queries?

2015-11-27 Thread Bernardo Sulzbach
me) excessive. In the end of the day, you shouldn't be relying on these arbitrary results anyway, databases are dynamic (most of the tables are, at least) and you should be prepared to handle a different query result from time to time. -- Bernardo Sulzbach

[sqlite] FOREIGN KEY enhancement request

2015-11-26 Thread Bernardo Sulzbach
Oh, OK. I thought they were in the same table. On Thu, Nov 26, 2015 at 11:56 AM, Simon Slavin wrote: > > On 26 Nov 2015, at 1:52pm, Bernardo Sulzbach > wrote: > >> I did not mean that. But if you want to check that a certain row has a >> valid value like you describ

[sqlite] FOREIGN KEY enhancement request

2015-11-26 Thread Bernardo Sulzbach
ount='no' or ((job='dealer' or job='agent') and can_discount='yes') On Thu, Nov 26, 2015 at 11:38 AM, Simon Slavin wrote: > > On 26 Nov 2015, at 1:36pm, Bernardo Sulzbach > wrote: > >> I am not against this feature request, Simon. But enligh

[sqlite] FOREIGN KEY enhancement request

2015-11-26 Thread Bernardo Sulzbach
I am not against this feature request, Simon. But enlighten my why this cannot be done with a CHECK constraint? I may be missing something very simple. Thanks.

[sqlite] drop, create and copy a table

2015-11-25 Thread Bernardo Sulzbach
sers at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Bernardo Sulzbach

[sqlite] Dont Repeat Yourself (DRY) and SQLite

2015-11-25 Thread Bernardo Sulzbach
e the text is instead of copying it), but I don't think that this brings huge advantages. -- Bernardo Sulzbach

[sqlite] INSERT DEFAULT literal-value

2015-11-23 Thread Bernardo Sulzbach
ers at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users I don't think there is a technical reason for this, it seems rather trivial to implement it (disclaimer: I am not a SQLite developer and may be wrong). Ultimately, it is rather unnecessary, even if it would be "convenient". -- Bernardo Sulzbach

[sqlite] How hard is it to add the constraint name to the 'FOREIGN KEY constraint failed' message?

2015-11-18 Thread Bernardo Sulzbach
es. Maybe it can be shipped into SQLite 4. -- Bernardo Sulzbach

[sqlite] How hard is it to add the constraint name to the 'FOREIGN KEY constraint failed' message?

2015-11-18 Thread Bernardo Sulzbach
ends up as a "wontfix". -- Bernardo Sulzbach

[sqlite] [AGAIN] SQLite on network share

2015-11-13 Thread Bernardo Sulzbach
ation of "support" is "make money from"? > It does not mean "works". > This. If you use SQLite or not, the list loses **very** little. But they could always use another customer. You shouldn't ask their support this questions, they are not giving you any formal guarantees. -- Bernardo Sulzbach

[sqlite] [AGAIN] SQLite on network share

2015-11-13 Thread Bernardo Sulzbach
hink there is. You also mentioned "max 5". In some cases your current "max" is far below what your true "max" is going to be. If you need a DB that works over a network, SQLite doesn't look like the best candidate to me. -- Bernardo Sulzbach

[sqlite] "Shipping a New Mindset" - SQLite in Windows 10

2015-11-10 Thread Bernardo Sulzbach
ublishing an outstanding textbook on that subject, we do hereby > confirm unto him the title of > > Certified SQLite Professional > Not only that, but the #1 Certified SQLite Professional. -- Bernardo Sulzbach

[sqlite] "Shipping a New Mindset" - SQLite in Windows 10

2015-11-10 Thread Bernardo Sulzbach
On Tue, Nov 10, 2015 at 7:20 PM, Christian Werner wrote: > I wonder what the knife will be ;-) Maybe there is no knife this time. Just kidding. But yeah, kudos for R. Hipp and everyone that contributed to the project. -- Bernardo Sulzbach

[sqlite] Random performance issues with SQLite

2015-11-09 Thread Bernardo Sulzbach
ll the program completely**, as many AVs like to keep some things running even when they are "disabled". -- Bernardo Sulzbach

[sqlite] A little light reading

2015-11-09 Thread Bernardo Sulzbach
used. Still, the problem is not going to disappear anytime soon. -- Bernardo Sulzbach

[sqlite] A little light reading

2015-11-08 Thread Bernardo Sulzbach
; the "?"). Of course having more than one card like this is illegal... > Did you sent the cards back? Can't you use a "plain" a for legal purposes? -- Bernardo Sulzbach

[sqlite] A little light reading

2015-11-08 Thread Bernardo Sulzbach
quot; nullity there if you think about it. -- Bernardo Sulzbach

[sqlite] CSV excel import

2015-08-01 Thread Bernardo Sulzbach
> P.S. As Simon noted, it seems to be defined here: > > I was probably referring to the first sentence of chapter 2: "While there are > various specifications and implementations for the CSV format" OK for that document existing and all, but just a quotes:

[sqlite] CSV excel import

2015-07-31 Thread Bernardo Sulzbach
> =CONCATENATE("INSERT INTO myTable VALUES (",a1,","a2");") This is so neat. Supposing you are not migrating from a spreadsheet because it got too big (millions of rows will take a time for this to finish) and that your data respects a logical grouping, this is very handy.

[sqlite] CSV excel import

2015-07-30 Thread Bernardo Sulzbach
> My point is that I have seen so many emails regarding this incorrect csv > import, that it would be so easy for us if it just simply works in the CLI > and delivered in standard in the sqlite3 executable. I don't think I understand what you mean by this. Also, most of the problems seems to ari

[sqlite] CSV excel import

2015-07-30 Thread Bernardo Sulzbach
I can remember two times when my life would have been easier if I could throw big .ods into sqlite3 dbs. So I would also like such a project.

[sqlite] Help with understanding sqlite3_mprintf_int test expected result

2015-07-23 Thread Bernardo Sulzbach
Richard, He wrote (ans I wasted my time reading) > If you are reading this email, but you are not gcc-help administrator, > please, please, forward this email to the administrator or simple reply to > all. GCC-help should know what to do with this message. He seems to be trying to contact the

[sqlite] Possible substr() optimization?

2015-07-23 Thread Bernardo Sulzbach
> That's not quite the same. BETWEEN is inclusive of both ends. ('b' BETWEEN > 'a' and 'b') is true. Yes, you are right. I'm sorry for that, just wanted to point out that (as most would expect) .. >= 'a' and .. < 'b' would not match uppercase beginnings.

[sqlite] Possible substr() optimization?

2015-07-23 Thread Bernardo Sulzbach
> select * from tbl1 where substr(col1,1,1) in ('A','a') and col1 like 'a_c%'; Just adding to Igor's answer: col1 between 'a' and 'b' or col1 between 'A' and 'B' if you need this case sensitive behavior

[sqlite] Broken link on System.Data.SQLite homepage

2015-07-22 Thread Bernardo Sulzbach
I guess this site is not a responsibility of sqlite.org, right?

[sqlite] Doc page revision request

2015-07-21 Thread Bernardo Sulzbach
Just to add some to the list of silly filters and silly silliness: at home I can access everything, my school blocks wikipedia. I am not kidding.

[sqlite] Doc page revision request

2015-07-21 Thread Bernardo Sulzbach
I understand that the filter is not something his father hacked with Python in 10 minutes, but I don't think this will make anyone change the page. cnt is used by Oracle, Microsoft (there is even a .cnt extension if I am not mistaken), and I'd also say that any big software company has cnt somewher

[sqlite] Doc page revision request

2015-07-21 Thread Bernardo Sulzbach
might be an issue, even though "cnt" >> is completely innocuous in formal documentation in a way it would not be in >> a "how many ... does it take to change light bulb" joke or in a string of >> offensive expletives. >> >> It is a matter of cont

[sqlite] Doc page revision request

2015-07-21 Thread Bernardo Sulzbach
About using "cnt", it is by far not just this page. There are tons of documentation and programming pages out there that use "cnt" instead of "count". The last part of your message seems more valid, though.

[sqlite] storing data across multiple tables

2015-07-17 Thread Bernardo Sulzbach
> I have multiple tables of data already, say TableA, TableB. These tables have > different representations, one may contain a TEXT column, the other may > contain and INTEGER column, but all of them contain an INTEGER field called > time, which is unique. I don't understand your specifications

Re: [sqlite] Is this a bug? autoincrement in int primary key vs integer primary key

2014-11-16 Thread Bernardo Sulzbach
see http://www.sqlite.org/autoinc.html > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Bernardo Sulzbach ___