Re: [sqlite] Bug in SQLite version 3.31.1 and 3.32?

2020-03-06 Thread Richard Damon
On 3/6/20 9:54 PM, Keith Medcalf wrote: On Friday, 6 March, 2020 19:25, Richard Damon wrote: It is sort of like NaN, where a Nan is neither less than, greater than or equal to any value, including itself. NULL (as in SQL NULL) means "missing value" or "unknown". NULL

Re: [sqlite] Bug in SQLite version 3.31.1 and 3.32?

2020-03-06 Thread Richard Damon
ce you can have NULL values, you have to know the rules very well when you apply logic. Other values make sense, but NULL is not logical. It is sort of like NaN, where a Nan is neither less than, greater than or equal to any value, including itself. -- Richard Damon

Re: [sqlite] Performance Issue on Large Table

2020-02-23 Thread Richard Damon
On 2/23/20 3:06 PM, R.Smith wrote: On 2020/02/23 21:23, Richard Damon wrote: On 2/23/20 8:31 AM, Olaf Schmidt wrote: An amount of 140 tables in such a "BibleVersions.db" is not uncommon and can be managed by SQLite in a good performance. I'm not sure that form of division wou

Re: [sqlite] Performance Issue on Large Table

2020-02-23 Thread Richard Damon
data from be taken from a field you get in a query. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to group this?

2020-02-10 Thread Richard Damon
On 2/9/20 11:44 PM, Rowan Worth wrote: On Mon, 10 Feb 2020 at 11:12, Richard Damon wrote: On 2/9/20 7:24 PM, Bart Smissaert wrote: ID ENTRY_DATE TERM NUMERIC_VALUE ROWID 1308 15/Mar/2013 Systolic 127 701559 1308 15/Mar/2013

Re: [sqlite] How to group this?

2020-02-09 Thread Richard Damon
(and at least throw out an error when it sees that). -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] loading extension csv.c

2020-02-07 Thread Richard Damon
dard) which it appears not to be (as that shouldn't cause a problem with the shown code). -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Is mutliple-execute-one-commit slower than multiple single-execute-single-commit?

2020-01-29 Thread Richard Damon
, then multiple executes could exceed the memory cache, causing it to spill to the database, and then the commit needs to read that back and put it into the right place, while a commit after each execute keeps everything in memory until the commit writes it to the database. -- Richard Damon

Re: [sqlite] Find schema of a table in a query

2020-01-20 Thread Richard Damon
nd might change by any number of things. If the order that the SQL engine happens to choose to fetch the data does happen to be in the order specified by the ORDER BY, then a good engine will optimize it out, so it is free. -- Richard Damon ___ sq

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Richard Damon
, it may be very hard to distinguish that from an actual question mark in the data. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Unexplained table bloat

2020-01-13 Thread Richard Damon
to their fundamental 21 bit value and that encoded into UTF-8. If the code doesn't validate the data well enough to catch that issue, then I suspect the character counting would count each half of the surrogate pairs as a code-point, -- Richard Damon

Re: [sqlite] Unexplained table bloat

2020-01-12 Thread Richard Damon
values of that type (or NULL). -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Unexplained table bloat

2020-01-10 Thread Richard Damon
o see if they violate the rule, as that is just adding a lot of overhead for very little benefit. It is really expected that applications will do this sort of test at the borders, when possibly untrusted strings come in, and know that if good strings come in, the following processing will keep t

Re: [sqlite] Unexplained table bloat

2020-01-10 Thread Richard Damon
can be used to embed nulls in strings if the system doesn't enforce the minimum length encoding rule (at least for this character). I have no idea if that would work with SQLite though. -- Richard Damon ___ sqlite-users mailing list sqlite-users

Re: [sqlite] Causal profiling

2019-12-31 Thread Richard Damon
'object'. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] 18 minutes 41 seconds

2019-12-30 Thread Richard Damon
called the 1900's which went from 1900 to the end of 1999. Decade would work the same way, the 202st decade goes from 2011 to end of 2020, but the 2010s go from 2010 to end of 2019. -- Richard Damon ___ sqlite-users mailing list sqlite-users

Re: [sqlite] Causal profiling

2019-12-30 Thread Richard Damon
, there is perhaps an option to provide some specific configuration macros to allow SQLite to be optimized when included statically in a project, but those options shouldn't change the API. -- Richard Damon ___ sqlite-users mailing list sqlite-users

Re: [sqlite] How to determine the column type? – virtual table?

2019-12-14 Thread Richard Damon
On 12/14/19 1:55 PM, František Kučera wrote: > Dne 14. 12. 19 v 18:20 Richard Damon napsal(a): >> What he wants is different. He takes a basically arbitrary database >> (user provided) and an arbitrary SQL statement (also user provided) and >> he wants to determine wha

Re: [sqlite] How to determine the column type? – explicit cast

2019-12-14 Thread Richard Damon
REAL some way). 2) Parse the expression yourself and determine the types (and know ahead of time if there are problem columns). There might be ways to use some internals of SQLite to help, but SQLite isn't going to do the job itself, as it has no need for that answer (as it is based on assumpti

Re: [sqlite] How to determine the column type?

2019-12-14 Thread Richard Damon
ases, but there actually are some cases that are hard or impossible to determine, then those hard cases make it hard to handle the general problem. Thus even without using SQLite's flexibility it types stored in columns, you can't predetermine the type of some expressi

Re: [sqlite] How to determine the column type?

2019-12-13 Thread Richard Damon
f the issue is that you ARE allowing multiple types (since NULL is its own type), so you need to be prepared for differing types. One big thing to watch out is that columns of NUMERIC type can easily return values of either INTEGER or REAL type. Your single type expectation is easily broken her

Re: [sqlite] How to determine the column type?

2019-12-13 Thread Richard Damon
f you have it currently recorded as NULL, check the type in this row and update if needed, otherwise use the recorded type. Note that you need to be prepared for different queries of the same set of columns (or the same query at different times) may give you changing types for a given column at differ

Re: [sqlite] SLOW execution: Simple Query Uses More than 1 min

2019-12-09 Thread Richard Damon
en the fact that the fork succeeded is the promise that both processes have the right to access all of their address space. Any page that is writable needs to have swap space reserved, or you have allowed over committing. The OS can delay actually creating the new pages, and thus save some work, but if

Re: [sqlite] SLOW execution: Simple Query Uses More than 1 min

2019-12-09 Thread Richard Damon
But without virtual memory, many applications combinations that work acceptably now would just fail to run at all. Virtual memory itself isn’t the issue. Also, an OS could fairly easily be set up so an application that start to thrash its virtual memory is dropped in priority to get memory, and

Re: [sqlite] built-in printf() not supporting \n or \t ?

2019-11-28 Thread Richard Damon
any compiler provide as I believe it is a common extension used in linux. You also don't NEED positional arguements, you could use printf('%s1: %s%s2: %s', char(10), 'one', char(10), 'two') There is a discusson of why SQLite uses its own printf here: https://sqlite.org/printf.html -- Richard

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Richard Damon
ommonly available on a variety of platforms that the limitation is minor. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Optimising query with aggregate in subselect.

2019-11-20 Thread Richard Damon
e is a index with the needed data, then the second lookup isn't needed. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] mport SQLite import Latin1 data?

2019-11-15 Thread Richard Damon
ine in the SQLite shell. I don't think the shell is intended to be a 'Do Everything' tool, but a convenience and quick operation tool. As you command line operation shows, it isn't that hard to do the operation with other tools. -- Richard Damon

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-13 Thread Richard Damon
d is how to sort, because unless you directory listing for people to scan and find a person (and if you are, you probably should be asking explicit permission to do so), you generally don't really need to sort names, just be able to search names, and there wild card search are often much better at findi

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-12 Thread Richard Damon
ways last, and 'Surnames' aren't accurate either) -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 2:57 PM, Jose Isaias Cabrera wrote: > Igor Tandetnik, on Monday, November 11, 2019 02:24 PM, wrote... >> On 11/11/2019 12:50 PM, Richard Damon wrote: >>> Writing 20 UTF-32 characters may ALSO print less than 20 glyphs to the >>> screen. >> Or more, depe

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 3:49 PM, Jose Isaias Cabrera wrote: > Richard Damon, on Monday, November 11, 2019 02:37 PM, wrote... > >> No. > Aaaah, my apologies. We are talking about different things. You are talking > about a combination of Unicodes vs. full, character. I take it bac

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 2:16 PM, Jose Isaias Cabrera wrote: > Richard Damon, on Monday, November 11, 2019 12:50 PM, wrote... > >> Writing 20 UTF-32 characters may ALSO print less than 20 glyphs to the >> screen. > This is not true, if the string has more or at least 20 UTF32 characters,

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 12:39 PM, Jose Isaias Cabrera wrote: > Richard Damon, on Monday, November 11, 2019 11:19 AM, wrote... > >> UTF-32 is a reasonable internal operation format, if code-point >> operations are important. It does not make a good transmission format, > I agree.

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
elf when being printed. Then you need to remember that the one of reasons for providing the combining characters was that it was decided that there would not be created code points for all the possible composed characters, that many would be expressed only as decomposed form of a

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
of a string in UTF-32 is not trivial, because it could easily be more than one code-point due to combining characters. For many purposes it might not even include the first code-point, as that might be a formatting meta-point like the BOM or a text-direction cod

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
On 11/11/19 10:49 AM, Jose Isaias Cabrera wrote: > > Richard Damon, on Monday, November 11, 2019 09:47 AM, wrote... >> On 11/11/19 9:26 AM, Jose Isaias Cabrera wrote: >>> Simon Slavin, on Monday, November 11, 2019 08:50 AM, wrote... >>>> On 11 Nov 201

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-11 Thread Richard Damon
one system to another. Another option would be to define some user defined code point pair as a graphics escape, and put within it an encoding of a graphics file containing the glyph, but at that point you are really outside of being 'Unicode' -- Richard Damon ___

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-10 Thread Richard Damon
rn up whose > name is 'n' recurring to an infinite number of characters or something! > > Cheers, >     Gary    B-) Actually, 'The Artist whose name formerly was Prince' (which wasn't his name, his legal name was an unpronounceable pictograph), breaks every computer system I know. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-09 Thread Richard Damon
_ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite- >> users > ___ > sqlite-users mailing list > sqlite-users@mailingli

Re: [sqlite] Deterministic random sampling via SELECT

2019-11-07 Thread Richard Damon
On 11/7/19 5:13 PM, Doug Currie wrote: > On Thu, Nov 7, 2019 at 4:23 PM Richard Damon > wrote: > >> One thought would be to generate a ‘hash’ from part of the record, maybe >> the record ID, and select records based on that value. The simplest would >> be something lik

Re: [sqlite] Deterministic random sampling via SELECT

2019-11-07 Thread Richard Damon
> On Nov 7, 2019, at 2:15 PM, Merijn Verstraaten wrote: > >  >> On 7 Nov 2019, at 19:16, David Raymond wrote: >> >> Along those lines SQLite includes the reverse_unordered_selects pragma >> https://www.sqlite.org/pragma.html#pragma_reverse_unordered_selects >> which will flip the order it

Re: [sqlite] Roadmap?

2019-10-27 Thread Richard Damon
hing much more complicated  could easily require that SQLite update the whole table row by row, and that likely would require making sure that nothing else was looking at the database, as it might not be possible to keep the view consistent. -- Richard Damon

Re: [sqlite] Roadmap?

2019-10-27 Thread Richard Damon
**2, and computing the mean and stdev from that in code, as was shown earlier in the thread, but having STDEV as a built-in summary function could be useful. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mail

Re: [sqlite] Roadmap?

2019-10-21 Thread Richard Damon
icode can't really solve that issue. (Two langauges might use some of the same characters, but treat them differently for sorting). -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Standard deviation last x entries

2019-10-20 Thread Richard Damon
stimates" are undefined for sample-size == 1) >>> >>> Finally for those interested, the CTE-based "iterated Square-Root", >>> cut out for an isolated calculation of sqrt(2). >>> >>> With r(s2, s, i) As (Select 2, 1, 1 Union All >>>S

Re: [sqlite] Standard deviation last x entries

2019-10-12 Thread Richard Damon
gt; as I am doing this in an Android phone app) but I can do this last step >>> in >>> code. >>> >>> RBS >>> ___ >>> sqlite-users mailing list >>> sqlite-users@mailinglists.sqlite.org >>

Re: [sqlite] Standard deviation last x entries

2019-10-12 Thread Richard Damon
On 10/12/19 11:23 AM, Richard Damon wrote: > On 10/12/19 10:08 AM, Bart Smissaert wrote: >> How do I get the standard deviation of the last 4 entries (there could be >> less than 4) of an integer column grouped by an integer ID entry in another >> column in the same table

[sqlite] /

2019-10-12 Thread Richard Damon
idered a sample you need to make a small adjustment in the formula to Estimated Variance of Popultion = S2 / (N-1) - S * S / (N * (N-1)) -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Hello everyone, I found some strange behavior when using the Command Line Shell For SQLite.

2019-10-03 Thread Richard Damon
tp://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users My guess is that column mode doesn't understand all the strangeness that comes with Unicode and fonts, and probably expects that each code point is exactly the same width. I note that at least on my computer the CJK char

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-30 Thread Richard Damon
Isolation appears to be a Term of Art, not a Standardized Term so it can be forgiven if it isn't used in the documentation. Also, it seems to imply non-serialized writes, which SQLite does NOT provide, so isn't even really applicable. -- Richard Damon __

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-29 Thread Richard Damon
nection SQLite provides isolation between operations in separate database connections. However, there is no isolation between operations that occur within the same database connection. -- Richard Damon ___ sqlite-users mailing list sqlite-users@maili

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-29 Thread Richard Damon
yourself). By passing the snapshot and not the connection with transaction with the snapshot, you can be sure that the receiver can't disturb the session and invalidate the snapshot. By opening the snapshot, the receiver is able to recreate the database at that point, to read its state, but can'

Re: [sqlite] Conflict between snapshots and checkpoints

2019-09-28 Thread Richard Damon
o be committed or invalidate the snapshot until the snapshot is freed. What that would ultimately do is cause your program to get an error from SQLite3 farther down the road when you did some action on the connection that would potentially invalidate your precious snapshot, and you now have one

Re: [sqlite] SQLite - macOS

2019-09-23 Thread Richard Damon
> On Sep 23, 2019, at 1:25 PM, Simon Slavin wrote: > >> On 23 Sep 2019, at 5:53pm, Pierre Clouthier >> wrote: >> >> Can anyone explain how to write UTF-8 in SQLite on the Mac? >> >> We use this statement: >> >> sqlite3_exec("PRAGMA encoding = \"UTF-8\";") > > This is not a SQLite

Re: [sqlite] SQLite - macOS

2019-09-23 Thread Richard Damon
Not sure what you code is doing, and you aren’t showing how you are getting your 'é' into SQLite, but U+FFFD is the standard character for malformed data, so something somewhere is complaining about converting something into UTF-8. Also, you CAN’T have a UTF-8 value like 0xC3A9, as that is not

Re: [sqlite] What is wrong with this SQL?

2019-09-22 Thread Richard Damon
at match BOTH tables, so to pass the first INNER JOIN the record need P.SEX = 'Male', and then to pass the second it would need P.SEX = 'Female' at the same time.  -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] INSERT vs BEGIN

2019-09-03 Thread Richard Damon
(if not universally supported, but that is somewhat common with SQL) -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] .save always errors: database is locked

2019-08-30 Thread Richard Damon
ave' a database after working with it. The 'Save' command is basically similar to the 'Save As' command for a document. Since the database is current open, trying to save back over the original copy can't be done, as it is open for reading, and also doesn't need to be done. -- Richard Damon

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread Richard Damon
planner chose a different plan which works better. Perhaps you could look at and compare the query plans of the two different scenarios. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Documentation update request

2019-08-15 Thread Richard Damon
> On Aug 15, 2019, at 10:37 AM, Simon Slavin wrote: > > > > says that sqlite_master cannot be changed. > > > > tells you how to change it. > You under quote, the faq says it “can not be changed (except

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-14 Thread Richard Damon
iss-matched braces, and letting your editor find matching braces it tends to be fairly quick to locate it. The key is to compile (or have the editor syntax check) often enough that you can't make two opposing errors like this that hide each other. -- Richard Damon

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-11 Thread Richard Damon
scription. There have been many great ideas and it would be a pity if they > got lost in the depths of the mailing list ;) > > Just my 2cts > Thomas -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [SPAM?] Re: Explicit "read transaction" with journal_mode=WAL.

2019-07-31 Thread Richard Damon
If, and it is possible for there to be sequencing to enforce it, You KNOW that step 1, get a read transaction (which the OP presumes implies includes getting the lock) occurs before step 2, and thus step 4 seeing changes from step 3 says something is wrong. Yes, if you only can use the

Re: [sqlite] [SPAM?] storing blobs in a separate table

2019-07-31 Thread Richard Damon
obs, it may be better to keep them in the main table. It is always good to know the WHY behind these rules of thumbs, so you know how to apply them. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [SPAM?] Re: Explicit "read transaction" with journal_mode=WAL.

2019-07-31 Thread Richard Damon
riendelijke groeten, Mit besten >> Grüßen, >> Olivier Mascia >> >> ___ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> >

Re: [sqlite] [SPAM?] Re: Explicit "read transaction" with journal_mode=WAL.

2019-07-30 Thread Richard Damon
needs to access the database that it establish its 'end-mark'. Doing the SELECT is one way to do that, adding some variation of BEGIN that immediately starts a SHARED lock would be another. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Determining valid statement placeholders.

2019-07-22 Thread Richard Damon
But he was to be able to provide the args as {‘0’:’one, ‘10’:’ten’} and since he only uses positional rags 1 and 10 that it be OK, i.e. positional args are treated as key word args, and only those actually used are needed. THAT can’t be provided by the API. > On Jul 22, 2019, at 9:22 AM, Keith

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Determining valid statement placeholders.

2019-07-22 Thread Richard Damon
The problem is you are defining your problem differently than SQLite does, so it can’t help you. To SQLite, a query with ?10 in it has (at least) 10 positional parameters, and if you are defining that the user needs to explicitly provide values for all parameters, (by SQLite) that means they

Re: [sqlite] I can insert multiple rows with the same primary key when one of the value of the PK is NULL ...

2019-07-19 Thread Richard Damon
One big issue is that in general (as I remember right) pragmas generally affect the connection, not the database itself, so shouldn’t change how the schema is interpreted, or another connection (or before issuing the pragma) might interpret things differently and possibly see the database as

Re: [sqlite] [SPAM?] Re: Grammar police

2019-07-11 Thread Richard Damon
at begin with an initial unstressed h-vowel might not have the h really vocalized, so the following sound is vowelish, so it takes 'an' (there isn't enough h to break up the vowel cluster). This can largely be affected by the accent one talks with (which can be related but different than the dialec

Re: [sqlite] [SPAM?] Re: [SPAM?] Is WAL mode serializable?

2019-07-10 Thread Richard Damon
busy that tells you that you will NEVER be able to upgrade, then you need to close the transaction, and when you restart, you should forget the previous data you read (at least as it relates to what you might want to write) as it might have changed, so you need to read it again to be

Re: [sqlite] [SPAM?] Re: Is WAL mode serializable?

2019-07-10 Thread Richard Damon
nd re-do its reads before it can do its write. The differences is that in WAL mode, one transaction doesn't need to wait for all the reads to finish before it can start. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mai

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) >>>>> >>>>

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

2019-06-13 Thread Richard Damon
ng the result is much better than just defining that anything could happen. It could have been defined as just a NaN, but having a special 'error' value for +Inf or -Inf turns out to be very useful in some fields. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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

2019-06-13 Thread Richard Damon
-0.0 < 0.0 is FALSE, so -0.0 is NOT "definitely left of true zero" -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [SPAM?] Re: round function inconsistent

2019-05-27 Thread Richard Damon
can easily get answer that seem wrong (but actually follow the rules). This is why many business application and the supporting languages for them adopted a 'Decimal' number that stores numbers with decimal fractions (base 10), to get around the fact that as people we are used to thinking in numbers base 10. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-27 Thread Richard Damon
s the file. It isn't perfect protection, because someone still will have the ability to delete/overwrite the file, to protect from that seems to need the protection method you describe, but if you are only trying to protect against Murphy, and not Machiavelli (as the sa

Re: [sqlite] [SPAM?] Re: round function inconsistent

2019-05-24 Thread Richard Damon
action of a penny, so the binary issue isn't an issue any longer, since 0.5 is a number that IS exactly representable, so the rounding point is exact). -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqli

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-06 Thread Richard Damon
hn Lennon sang, "...the world will live as one." ;-) > > Happy dating... > > josé It depends a lot on how you want to define a 'week' and what you are going to use it for. If printing a traditional calendar, a one day week makes a lot of sense. The first

Re: [sqlite] Problem with REAL PRIMARY KEY

2019-05-04 Thread Richard Damon
is down in implementation details (a 'Double' has less than 59 significant bits, so can not express the value 0x7ff) -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Richard Damon
> On Apr 12, 2019, at 12:58 PM, x wrote: > > I’ve been asking myself if I could have done the above more efficiently as > sqlite’s converting the original string then I’m converting it and copying > it. While thinking about that I started to wonder how c++ handled utf8/16. > E.g. To access

Re: [sqlite] Remove row to insert new one on a full database

2019-04-05 Thread Richard Damon
On Apr 5, 2019, at 12:31 PM, James K. Lowden wrote: > > On Fri, 5 Apr 2019 15:45:10 +0300 > Arthur Blondel wrote: > >> The data is always the same. That's why removing one row should be >> enough to insert a new one. >> My problem is that some times I need to remove many rows to add one >> new

Re: [sqlite] Remove row to insert new one on a full database

2019-04-05 Thread Richard Damon
will smooth out the access time, at the cost of possibly higher disk usage at times (but maybe a better ratio of size per records). -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/

Re: [sqlite] ANN: SQLite3 Decimal Extension

2019-04-05 Thread Richard Damon
bit of information) -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Remove row to insert new one on a full database

2019-04-04 Thread Richard Damon
On 4/4/19 11:35 PM, Simon Slavin wrote: > On 5 Apr 2019, at 4:14am, Richard Damon wrote: > >> I think is logic is to attempt to insert a row, and if rather than >> inserting it, the call returns the error condition, 'Database Full' > Okay. So now we understand what OP meant

Re: [sqlite] Remove row to insert new one on a full database

2019-04-04 Thread Richard Damon
s mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Remove row to insert new one on a full database

2019-04-04 Thread Richard Damon
can bring together all the odd holes from the various pieces of deleted data.  -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [SPAM?] Re: UPSERT with multiple constraints

2019-03-28 Thread Richard Damon
and A, B, C properties. >> >> ___ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ > sqlite-users mailing list > sqlite-users@mail

Re: [sqlite] DATA RACE on sqlite3GlobalConfig.isInit

2019-03-21 Thread Richard Damon
s false, does an initialization that would be improper because it had already been done, then THAT would be a data race, but its scope is bigger than just those two lines. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.

Re: [sqlite] Handling ROLLBACK

2019-03-03 Thread Richard Damon
On Mar 3, 2019, at 8:32 AM, Simon Slavin wrote: > > To summarize, the list feels that this is an incorrect model > >BEGIN; >... first set of commands >ROLLBACK; >... second set of commands >END; > > whereas this is how things are meant to work: > >BEGIN; >... first

Re: [sqlite] ON CONFLICT with partial indexes

2019-02-18 Thread Richard Damon
> On Feb 18, 2019, at 10:23 AM, Charles Leifer wrote: > > Thanks for the explanation. So does this mean that two identical queries > can have completely different query plans depending on whether they use a > parameters vs literal values embedded in the SQL string? > Remember the query plan is

Re: [sqlite] sqlite 3.37.1: void function returns value

2019-02-11 Thread Richard Damon
> On Feb 11, 2019, at 6:33 AM, Peter da Silva wrote: > > I am pretty sure that the code is not legal C because it's using the return > value of a void function, as well as returning a value from a void > function. Compilers that "do what I mean" and accept it are in error. It's > certainly

Re: [sqlite] GROUP BY and ICU collation

2019-02-08 Thread Richard Damon
ond pass take place, and on the second pass, S and Š compare with an order (I thought I remembers there even being some cases that needed a third pass). -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Database locking problems

2019-01-21 Thread Richard Damon
f microseconds if the data resides in cache, slightly longer if the database is in flash memory, and perhaps 100s of microseconds to milliseconds if the database is on spinning rust, and the operation needs to access the drive to get the needed data. -- Richard Damon ___

Re: [sqlite] Database locking problems

2019-01-20 Thread Richard Damon
s, then the fact that other DBMS run the database server in a separate process handles a lot of the sharing issues (at the cost of overhead). SQLite, gets rid of a lot of that overhead at the cost of the application needs to follow a set of rules. -- Richard Damon _

Re: [sqlite] Database locking problems

2019-01-20 Thread Richard Damon
On 1/20/19 4:51 PM, andrew.g...@l3t.com wrote: > James K. Lowden wrote: >> On Sat, 19 Jan 2019 08:07:42 -0500 Richard Hipp wrote: >>> The busy timeout is not working because you start out your transaction >>> using a read operation - the first SELECT statement - which gets a read >>> lock. Later

Re: [sqlite] Conditional lowering of value

2019-01-04 Thread Richard Damon
ously using SQLite's variation from SQL of mixed type columns, as it appears that totalUsed is likely a column that is normally numeric, but sometimes a string. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://

Re: [sqlite] A Minor Issue Report: Extra const Keyword in PragmaName zName

2019-01-02 Thread Richard Damon
declaring that zName is an immutable pointer to a immutable string/character, which is actually likely true, as the code shouldn't be changing the names of pragmas. Your modified definition says that the code is allowed to poke through zName and change the string representing the pragma

Re: [sqlite] Using sqlite3_interrupt with a timeout

2018-12-31 Thread Richard Damon
SQLite is spending time checking a flag to stop in the middle of processing a step to allow the processing to terminate early without a result. -- Richard Damon ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

  1   2   >