Re: [sqlite] Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-15 Thread Jean-Marie CUAZ
Maybe the core pb under the question asked here is this prior question : from the standard, is it possible to consider 0.0 as an imprecise representation of 0 ? (if yes, signing 0.0 seems logical to me) Regards, -jm --- L'absence de virus dans ce courrier électronique a été vérifiée par

Re: [sqlite] Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-12 Thread Jean-Marie CUAZ
> what should SQLite do when the application asks it to convert > a -0.0 value into text. It is only the binary-to-text conversion routine that is at question here. A possible solution could be a new function, - something like abszero() or trimzero() - acting only on +/- 0.0 and suppressing

Re: [sqlite] Example/recipe for truncating fp numbers

2017-07-12 Thread Jean-Marie CUAZ
Thank you M. Medcalf for your nice explanation. In my first post, I gave half of the used solution : when storing a "truncated value", eventual remaining digits are allso, separately, stored as a whole integer. Both parts are reassembled later when needed (i.e. when doing set agregation).

Re: [sqlite] Example/recipe for truncating fp numbers

2017-07-11 Thread Jean-Marie CUAZ
To M. Slavin, Medcalf ans Hipp: Thanks for your attention. Yes, "cast(value * 1000 as integer) / 1000.0" is much better and I will switch to your formula when possible, thanks very much. Thank you for your offer of C functions : a trunc() function is certainely what is needed, but I don't

[sqlite] Example/recipe for truncating fp numbers

2017-07-10 Thread Jean-Marie CUAZ
Hello, Below is a recipe on a "best effort" basis, to truncate fp numbers on the right side of the decimal separator with SQLite. It is not intended to correct any fp numbers processing, but only to discard, without any rounding, unwanted fractional digits. The following is directed to

[sqlite] Thoughts about enhancing "PRAGMA quick_check" speed

2015-05-03 Thread Jean-Marie CUAZ
To reply to Mr. Slavin > In any properly working system even integrity-check (more thorough than quick-check) never fails, and > neither should be necessary in anything except a rarely-used maintenance procedure. They are both > diagnostic tools for faults, not part of a smoothly running

[sqlite] Thoughts about enhancing "PRAGMA quick_check" speed

2015-05-02 Thread Jean-Marie CUAZ
Thank you for your answers. To reply to Mr. Hipp and Mr. Morras : Yes your are right, verifications made, the process is I/O bound. (CPU activity jumps from 1% - 2% at iddle time to 5-6 % when a "PRAGMA quick_check" is processed). Thank you for pointing to me the right track ! About

[sqlite] Thoughts about enhancing "PRAGMA quick_check" speed

2015-05-01 Thread Jean-Marie CUAZ
Hello, We use Sqlite + Tcl/Tk in a payroll application and everything works great at high speed ! In this application, "PRAGMA quick_check" are processed in a few places as a security measure : - before processing backup/restore operations. - during the process of login into the application.

[sqlite] Re Problem related to ticket 4c86b126f2 ?

2014-02-19 Thread Jean-Marie CUAZ
Here is a copy and paste of the shema involved : db1 eval {CREATE TABLE BulletinsTemp0 (\ IDPayeMens VARCHAR(19), \ CodSoc VARCHAR(3), \ CodEtabliss VARCHAR(3), \

[sqlite] Problem related to ticket 4c86b126f2 ?

2014-02-18 Thread Jean-Marie CUAZ
Hello, Win XP + Tcl 8.6.1 + SQLite 3.8.3 (loaded from Active State) Possible usefull information on bug similar as 4c86b126f2 but in a simpler context (corrected by version SQLite 3.8.3.1) Description : For a table Tbl1 having historical data with 12 occurences (one for each month) of the

Re: [sqlite] Bug : Tcl interface + "INSERT OR REPLACE" statement

2013-09-25 Thread Jean-Marie CUAZ
ould occur if not replaced by new values, and then INSERT : filling complete rows with new values, some of them replacing the deleted ones, and with no alteration of constraint rules enforced on the table. Regards. Jean-Marie Cuaz ___ sqlite-use

Re: [sqlite] Bug : Tcl interface + "INSERT OR REPLACE"

2013-09-25 Thread Jean-Marie CUAZ
inst "replace" : a kind of "if not respected, do nothing" command not "if not respected, you can kill me"(*) (as done for the PK) -> so my expectation of an exception to be raised. Regards. Jean-Marie Cuaz (*) "and eventualy others" for UNIQUE __

[sqlite] Bug : Tcl interface + "INSERT OR REPLACE" statement

2013-09-24 Thread Jean-Marie CUAZ
cution : 2 rows are definitely deleted from the table ...(ouch !) Regards, Jean-Marie Cuaz ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Re BUG : round(x,y) inconsistent

2011-05-02 Thread Jean-Marie CUAZ
This post is to give an answer to Simon Slavin on the mailing list (unfortunately the buton "reply via email to Simon Slavin" on the web access to the mailing list doen't work for me (firefox 3.6.16) and returns "Requested archive does not exist" error) The method of rounding floating point

[sqlite] BUG : round(x,y) not consistent

2011-04-30 Thread Jean-Marie CUAZ
Win XP + SQLite 3.7.4 SELECT round(8.875,2)-> 8.88 SELECT round(16.875,2) -> 16.87 SELECT round(32.875,2) -> 32.88 SELECT round(64.875,2) -> 64.87 I'm not sure SQLite is the actual culprit (and I'm aware the subject is complicated) but it's annoying. Jean-Marie

[sqlite] "transaction" method of the Tcl bindings to SQLite

2011-03-24 Thread Jean-Marie CUAZ
Hello, In a Tcl script, is it safe to call the Tcl "_return_" command inside and before the end of a multi-statement "_transaction_" method (for aborting the Tcl procedure in case of Sql/application error) ? In other words is the transaction handled at the SQLite level "closed" safely (and

[sqlite] WHERE + GROUP BY and indices

2010-10-27 Thread Jean-Marie CUAZ
Hello, When using a SELECT query with WHERE and GROUP BY clauses, does it make sense to add the GROUP BY terms in an index allready containing the columns used in the WHERE clause ? If yes, should the columns used in the GROUP BY clause be at the beginning of the columns order of the index ?