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

2019-06-14 Thread Doug Currie
On Fri, Jun 14, 2019 at 7:16 AM R Smith wrote: > > What I was objecting to, is claiming (in service of suggesting the > use-case for -0.0), [...] > > I'll be happy to eat my words if someone can produce a mathematical > paper that argued for the inclusion of -0.0 in IEEE754 to serve a >

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

2019-06-14 Thread Thomas Kurz
> I'll be happy to eat my words if someone can produce a mathematical paper that argued for the inclusion of -0.0 in IEEE754 to serve a mathematical concept. It's a fault, not a feature. There are indeed very few use cases. The most common one is dealing with water temperature. You can have

[sqlite] INSERT INTO ... ON CONFLICT(...) DO UPDATE ...

2019-06-14 Thread Olivier Mascia
Dear, Assuming no explicit transaction, do statements like: INSERT INTO ... ON CONFLICT(...) DO UPDATE ... are treated completely within a _single_ implicit transaction? And is this _single_ implicit transaction of type IMMEDIATE? — Best Regards, Meilleures salutations, Met

Re: [sqlite] INSERT INTO ... ON CONFLICT(...) DO UPDATE ...

2019-06-14 Thread Richard Hipp
On 6/14/19, Olivier Mascia wrote: > Dear, > > Assuming no explicit transaction, do statements like: > > INSERT INTO ... ON CONFLICT(...) DO UPDATE ... > > are treated completely within a _single_ implicit transaction? Yes > And is this _single_ implicit transaction of type IMMEDIATE?

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

2019-06-14 Thread Richard Damon
On 6/14/19 7:15 AM, R Smith wrote: > > On 2019/06/14 4:23 AM, Richard Damon wrote: >> On 6/13/19 10:51 AM, R Smith wrote: >>> On 2019/06/13 4:44 PM, Doug Currie wrote: > Except by the rules of IEEE (as I understand them) > > -0.0 < 0.0 is FALSE, so -0.0 is NOT "definitely left of true

Re: [sqlite] select within transaction

2019-06-14 Thread Roman Fleysher
Thank you! I did not know (or forgot) about ".bail on" Roman From: sqlite-users [sqlite-users-boun...@mailinglists.sqlite.org] on behalf of David Raymond [david.raym...@tomtom.com] Sent: Friday, June 14, 2019 3:05 PM To: SQLite mailing list Subject: Re:

[sqlite] select within transaction

2019-06-14 Thread Roman Fleysher
Dear SQLiters, I am using sqlite3 shell. I have a transaction consisting of two commands: update and select. The idea is to get new state after update: PRAGMA busy_timeout = 50; BEGIN EXCLUSIVE; UPDATE OR ROLLBACK t SET c = 5 WHERE ...; SELECT d FROM t WHERE c = 5 AND ...; COMMIT; Is this

Re: [sqlite] select within transaction

2019-06-14 Thread Jose Isaias Cabrera
Roman Fleysher, on Friday, June 14, 2019 02:22 PM, wrote... > > Since ROLLBACK is not an error, I want SELECT to be executed only will update > actually happened (not rollback). Because of EXCLUSIVE, I want it to be in > one transaction and thus I need some indicator if SELECT was after

Re: [sqlite] select within transaction

2019-06-14 Thread David Raymond
How are you sending the commands to the cli? If you're doing... sqlite3 myfile.sqlite ".read somefile.sql" ...then you can start the sql file with... .bail on ...and as soon as it hits an error it will stop there and not continue processing lines. So if you get rid of the "or rollback" then

Re: [sqlite] select within transaction

2019-06-14 Thread Jose Isaias Cabrera
Jose Isaias Cabrera, on Friday, June 14, 2019 02:50 PM, wrote... > Yes, and no. From what I understand, and have been using it, if > something was written to the DB, it will give you a 1. Otherwise > a 0. But, it is not the amount of fields, just a write. ie. This is wrong information. It

Re: [sqlite] select within transaction

2019-06-14 Thread Adrian Ho
On 15/6/19 3:06 AM, Jose Isaias Cabrera wrote: > Jose Isaias Cabrera, on Friday, June 14, 2019 02:50 PM, wrote... > >> Yes, and no. From what I understand, and have been using it, if >> something was written to the DB, it will give you a 1. Otherwise >> a 0. But, it is not the amount of fields,

Re: [sqlite] select within transaction

2019-06-14 Thread Adrian Ho
On 15/6/19 2:22 AM, Roman Fleysher wrote: > I have a transaction consisting of two commands: update and select. The idea > is to get new state after update: > > PRAGMA busy_timeout = 50; > BEGIN EXCLUSIVE; > UPDATE OR ROLLBACK t SET c = 5 WHERE ...; > SELECT d FROM t WHERE c = 5 AND ...; >

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

2019-06-14 Thread R Smith
On 2019/06/14 4:23 AM, Richard Damon wrote: On 6/13/19 10:51 AM, R Smith wrote: On 2019/06/13 4:44 PM, Doug Currie wrote: Except by the rules of IEEE (as I understand them) -0.0 < 0.0 is FALSE, so -0.0 is NOT "definitely left of true zero" Except that 0.0 is also an approximation to zero,