Re: [sqlite] New SQLite Forum established - this mailing list is deprecated

2020-03-13 Thread Thomas Kurz
Why can't the forum just forward all new postings to this mailing list and vice versa? Then everyone could chose what to use ;) - Original Message - From: Richard Hipp To: General Discussion of SQLite Database Sent: Thursday, March 12, 2020, 21:17:59 Subject: [sqlite] New SQLite

[sqlite] .dump

2020-02-20 Thread Thomas Kurz
I noticed that the .dump command in the CLI doesn't contain the "user_version" and "application_id" fields. I don't know whether this is intentional, but would you consider including these values in the output of .dump? ___ sqlite-users mailing list

[sqlite] alter table

2020-02-17 Thread Thomas Kurz
I'd just like to kindly ask whether there are any new plans for a full ALTER TABLE support? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] WITHOUT ROWID tables

2020-02-15 Thread Thomas Kurz
Wouldn't be something like SELECT sql FROM sqlite_master WHERE tbl_name='?' AND type='table' contains "WITHOUT ROWID" be sufficient? Just being curious. - Original Message - From: sky5w...@gmail.com To: SQLite mailing list Sent: Saturday, February 15, 2020, 18:06:47 Subject:

Re: [sqlite] Can I search all tables and columns of SQLite database for a specific text string?

2020-02-13 Thread Thomas Kurz
I would create an SQL dump ("sqlite3 file.db .dump") and search therein. - Original Message - From: Scott To: SQLite Mailing List Sent: Thursday, February 13, 2020, 15:01:06 Subject: [sqlite] Can I search all tables and columns of SQLite database for a specific text string? Can I

Re: [sqlite] Check constrain execution timing change? (Now a bug)

2020-02-03 Thread Thomas Kurz
> You say that you want to prevent the use of the string literal '123' > for inserting into the integer field x. That will no longer be > possible in SQLite beginning with 3.32.0 (assuming the change > currently on trunk goes through.) > But, why do you want to do that? You are right. I

Re: [sqlite] Check constrain execution timing change? (Now a bug)

2020-02-02 Thread Thomas Kurz
strain execution timing change? (Now a bug) On 2/1/20, Thomas Kurz wrote: > Does this mean there will be no possibility to prevent inserting a string > into an integer column anymore? > create table x (x integer check (typeof(x) == 'integer')); > insert into x values ('1'); > --> will

Re: [sqlite] Check constrain execution timing change? (Now a bug)

2020-02-01 Thread Thomas Kurz
Does this mean there will be no possibility to prevent inserting a string into an integer column anymore? create table x (x integer check (typeof(x) == 'integer')); insert into x values ('1'); --> will pass in future versions??? - Original Message - From: Richard Hipp To: SQLite

Re: [sqlite] New word to replace "serverless"

2020-01-29 Thread Thomas Kurz
I would not choose a new wording. "Serverless" is correct, and just because others start using "serverless" in a wrong manner, I don't see any need for a change. Just my 2 cts. - Original Message - From: Richard Hipp To: General Discussion of SQLite Database Sent: Monday, January

Re: [sqlite] problem with URI mode=ro

2019-12-21 Thread Thomas Kurz
> Do the same thing again without the mode=ro > Do the files get deleted this time ? No, this shows the same behavior, but in this case, it's actually what I'd expect. > Does the program have enough privs over the database file's folder ? Yeah, sure, actually the file's on a FAT32 drive.

[sqlite] problem with URI mode=ro

2019-12-21 Thread Thomas Kurz
I have a problem when opening a read-only database, which is a WAL-mode database. When trying to open it in read-only mode, i.e. using file:test.sqlite?mode=ro, SHM and WAL file are created. That's unpleasant, but the actual problem is the two files don't get deleted when closing the database.

Re: [sqlite] DELETE extremely slow (.expert command)

2019-11-02 Thread Thomas Kurz
> It would/should have told you immediately that you needed those two > additional indexes, I should think. Unfortunately not. Someone told me about ".expert" some time ago and it's indeed helpful for me because I never know what indexes to create and why. But for this database everything

Re: [sqlite] DELETE extremely slow

2019-11-01 Thread Thomas Kurz
The database schema is not a secret. If it helps, I can post it, that's no problem. Is it enough to run ".dump" on a database without data? - Original Message - From: Keith Medcalf To: SQLite mailing list Sent: Friday, November 1, 2019, 22:57:02 Subject: [sqlite] DELETE extremely slow

Re: [sqlite] DELETE extremely slow

2019-11-01 Thread Thomas Kurz
ave? -Original Message- From: sqlite-users On Behalf Of Thomas Kurz Sent: Thursday, October 31, 2019 6:54 PM To: SQLite mailing list Subject: Re: [sqlite] DELETE extremely slow > Do you have memory to run this in? Have you increased the sqlite cache size > because that looks (

Re: [sqlite] DELETE extremely slow

2019-11-01 Thread Thomas Kurz
That's it!!! You're a genius! Thank you very very much! Run Time: real 8.290 user 3.25 sys 1.906250 - Original Message - From: Keith Medcalf To: SQLite mailing list Sent: Friday, November 1, 2019, 18:07:51 Subject: [sqlite] DELETE extremely slow One of your triggers requires and

Re: [sqlite] DELETE extremely slow

2019-11-01 Thread Thomas Kurz
> Do you have memory to run this in? Have you increased the sqlite cache size > because that looks (to me) an awful lot like I/O thrashing ... Sorry to disappoint you, Keith and Simon, but in all cases the database file has been located on a ramdisk. It's only about 50 MB in size, btw. >

Re: [sqlite] DELETE extremely slow

2019-10-31 Thread Thomas Kurz
> According to the MariaDB reference manual, it does not "do anything" with > references clauses on columns. Thanks for that hint, I will try again tomorrow because I cannot say for sure now whether it worked correctly or not. (And I don't have that data available anymore.)

Re: [sqlite] DELETE extremely slow

2019-10-31 Thread Thomas Kurz
> Something is wrong. If you did multiple commands like > > DELETE FROM MyTable; > > to your child tables, they should be fast. Have you run an integrity check ? I created a new database now, added the missing index "trace(datasetid)" as suggested by Keith. The result of "DELETE FROM dataset"

Re: [sqlite] DELETE extremely slow

2019-10-31 Thread Thomas Kurz
> Keith found the answer: you don't have the indexes required to make your > FOREIGN KEYs run quickly. Thanks, I will try that. > If you DELETE FROM the child tables first, do you get fast or slow times ? Yes, I already tried deleting from each table individually. It's slow everywhere. >

Re: [sqlite] DELETE extremely slow

2019-10-31 Thread Thomas Kurz
extremely slow On Thu, Oct 31, 2019 at 10:57 AM Thomas Kurz wrote: > I'm using a database with 5 hierarchically strcutured tables using foreign > keys. The largest table contains about 230'000 entries. My problem is that > deleting in this database is extremely slow: > pragma foreign_keys=

[sqlite] DELETE extremely slow

2019-10-31 Thread Thomas Kurz
I'm using a database with 5 hierarchically strcutured tables using foreign keys. The largest table contains about 230'000 entries. My problem is that deleting in this database is extremely slow: pragma foreign_keys=on; pragma journal_mode=wal; .timer on delete from dataset; --> Run Time: real

[sqlite] Backward compatibility

2019-10-29 Thread Thomas Kurz
We recently had a discussion about date/time support, but also other suggestions, which sooner or later end up at the point "cannot be done, would break backward compatibility". (See also: "Backward compatibility vs. new features (was: Re: dates, times and R)") I'm always curious and

Re: [sqlite] Single or double quotes when defining alias?

2019-10-28 Thread Thomas Kurz
Ok, thanks for everone's answer. - Original Message - From: James K. Lowden To: sqlite-users@mailinglists.sqlite.org Sent: Monday, October 28, 2019, 18:27:06 Subject: [sqlite] Single or double quotes when defining alias? On Fri, 25 Oct 2019 23:55:20 +0200 Thomas Kurz wrote

Re: [sqlite] Roadmap?

2019-10-27 Thread Thomas Kurz
> SQLite has had geospatial support for years via the r-tree extension, and > more recently GeoJSON. But not compatible to standards from Open Geospatial Consortium, as far as I know. Which requires additional conversions, and considering that geodata usually have sizes of a GB or more, this

Re: [sqlite] Roadmap?

2019-10-27 Thread Thomas Kurz
> What do you mean by "SQL-basics"? I forgot to mention that at least some basic math would be very helpful as well. I don't want to suggest a complete math support, that would really be far away from liteness, but the discussion standard deviation has shown that at least STDEV and POWER would

Re: [sqlite] Roadmap?

2019-10-27 Thread Thomas Kurz
> Omitting RIGHT JOIN is good, that's a misfeature and LEFT JOIN does > everything useful it does. With all dear respect, but I don't think that it is up to you to define what a "feature" and a "misfeature" is. iirc, RIGHT JOIN is declared in SQL92, it is part of the SQL standard, and

Re: [sqlite] Roadmap?

2019-10-26 Thread Thomas Kurz
> I suspect you are used to database servers, and haven’t used SQLite as an > embedded library inside an app Yes and no ;-) I have used database servers, and I am currently (for about 2 years) using (and appreciating!) SQLite library. > Full text search is very common Yes, of course. I

Re: [sqlite] Roadmap?

2019-10-26 Thread Thomas Kurz
> Feel free to make suggestions. Which missing feature or features causes you the most bother? Thanks, Dan. To me, the most puzzling thing is the lack of full ALTER TABLE support (DROP COLUMN, MODIFY COLUMN, ADD CONSTRAINT, DROP CONSTRAINT). Modifying tables is some kind of science in SQLite,

Re: [sqlite] Roadmap?

2019-10-26 Thread Thomas Kurz
> The features you name don't take away from the "liteness", they are all quite small and useful. Yes of course they are useful, I wouldn't deny that. But they are prioritized over SQL-basics, that's what I'm confused about. ___ sqlite-users mailing

[sqlite] Single or double quotes when defining alias?

2019-10-25 Thread Thomas Kurz
Dear all, this might be a stupid question, but do I have to use single or double quotes when defining an alias? SELECT column1 AS 'c' --or-- SELECT column2 AS "d" On the one hand, the name refers to a column or table identifier. On the other hand, at the time of using this statement, the

[sqlite] Roadmap?

2019-10-20 Thread Thomas Kurz
I'd kindly ask whether there is some sort of roadmap for SQLite development? Someone recently pointed out how much he loves the "lite" and well-thought features. I cannot see that: I observe that many "playground" gadgets keep being implemented (like virtual columns, virtual tables, FTS3/4/5,

Re: [sqlite] SQLite plus the works (was Re: Opposite of SQLite)

2019-10-10 Thread Thomas Kurz
> It has LEFT JOIN and does not have RIGHT JOIN. Why? Because RIGHT can be made > out of LEFT by swapping order of tables. The paradigma of SQL is to let the user describe what he wants to do, not to think about how to describe the problem so that the database system does understand. The lack

Re: [sqlite] Date time input

2019-10-10 Thread Thomas Kurz
> I hope you will experience such joy as well. Well, I don't ;-) The lack of full ALTER TABLE support frustrates me every time, even though I greatly appreciate most other parts of SQLite and the developers' work. But a more complete SQL statement support would be very, very helpful.

Re: [sqlite] Determining column collating functions

2019-08-16 Thread Thomas Kurz
Would you consider implementing this not as a pragma, but as a real statement, like MySQL's SHOW COLUMNS (https://dev.mysql.com/doc/refman/5.5/en/show-columns.html)? Would be easier to memorize. - Original Message - From: Keith Medcalf To: SQLite mailing list Sent: Wednesday, August

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

2019-08-16 Thread Thomas Kurz
Another reason: because PostgreSQL supports it as well (including timezone) ;-) - Original Message - From: Peter da Silva To: SQLite mailing list Sent: Tuesday, August 13, 2019, 23:18:29 Subject: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R) If the

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

2019-08-12 Thread Thomas Kurz
> And now you have a file which can't be edited with old versions of the CLI. > However you cut it, you have compatibility problems. One shouldn't do it at all. It's like trying to a edit a DOCX with Word95. It's not *backward* compatibility. It's not the case you mentioned before. And

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

2019-08-12 Thread Thomas Kurz
> A programmer uses a copy of the SQLite CLI to correct errors in a database > made and maintained by a production program. This involves making a new > table, copying some data from the old data to the new table, deleting the old > table, then renaming the new table. When the programmer is

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

2019-08-12 Thread Thomas Kurz
> This would break backward compatibility. It is necessary to be sure that > database files made with current versions of SQLite can be opened with old > versions back to 2013. This is what I would call "forward compatibility": You expect an old application to be able to read file formats of

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

2019-08-12 Thread Thomas Kurz
> Since date/time is stored as an offset in some units from an epoch of some > type, the "datatype" declaration is nothing more than an annotation of an > already existing double or integer type -- and you can already annotate your > select column names and table attribute type declarations

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

2019-08-11 Thread Thomas Kurz
> The issue for something like a data-time field is how would you indicate that a field is a data-time field. Due to backwards compatibility it can't use the term data or time to trigger that use, as existing applications use that and expect a different result, based on published and promised

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

2019-08-11 Thread Thomas Kurz
> I do understand the value of having date/time types in SQLite, but it is not > easy to do while retaining backward compatibility. It'll have to wait for > SQLite4 or something. Actually I do not really understand the point about backward compatibility. Many very useful suggestions are

Re: [sqlite] Feature request: import MySQL dumps in CLI

2019-08-07 Thread Thomas Kurz
> I highly doubt the SQLite team will undertake this task. They > Surely have the skill to do so, but their priority is the one > software product you desire to use, undoubtedly due to its > high utility. I doubt that utility would exist if they were > to wander off tacking the conversion

Re: [sqlite] Feature request: import MySQL dumps in CLI

2019-08-07 Thread Thomas Kurz
archar(50) not null END TRANSACTION; - Original Message - From: Simon Slavin To: SQLite mailing list Sent: Wednesday, August 7, 2019, 18:25:45 Subject: [sqlite] Feature request: import MySQL dumps in CLI On 7 Aug 2019, at 5:13pm, Thomas Kurz wrote: > So my suggestion would

[sqlite] Feature request: import MySQL dumps in CLI

2019-08-07 Thread Thomas Kurz
Dear SQLite team, I suppose I am not the only one having to convert between MySQL/MariaDB and SQLite databases every now and then. I know there are converters for MySQL dumps but none of any I have ever tried did work nearly reliable. So my suggestion would be to add an import feature to the

Re: [sqlite] Hidden data

2019-08-04 Thread Thomas Kurz
Have you tried dumping the database ("sqlite3 places.sqlite .dump") and then searching for some known data in the resulting SQL file? - Original Message - From: bitwyse To: sqlite-users@mailinglists.sqlite.org Sent: Sunday, August 4, 2019, 18:33:29 Subject: [sqlite] Hidden data

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

2019-07-31 Thread Thomas Kurz
Would it be possible for you to give some feedback (just an estimation) whether or not a suggestion might be considered? - Original Message - From: Richard Hipp To: SQLite mailing list Sent: Wednesday, July 31, 2019, 16:10:13 Subject: [sqlite] [SPAM?] Re: Explicit "read transaction"

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 Thomas Kurz
Imho it would be helpful (especially for newbies that don't know the full history of SQLite) to have a "PRAGMA strict_mode" or similar, to disable all kinds of historical bugs. They might be relevant for existing applications but in no way for newly created ones. Among the things to consider

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

2019-07-18 Thread Thomas Kurz
> You might prefer adding an explicit NOT NULL on both "client" and "salesman" > columns. > There is an historical reason why SQLite accepts NULL for primary key > column(s). Ok, thanks for the hint, I didn't know that either. But it is a very odd behavior, because PRIMARY KEY per definition

[sqlite] modify table (again)

2019-07-01 Thread Thomas Kurz
Dear all, I really followed the 12-step ALTER TABLE schema and stumbled upon the following problem: PRAGMA foreign_keys=1; CREATE TABLE A (id INTEGER PRIMARY KEY, v1 TEXT, v2 INTEGER); CREATE TABLE B (id INTEGER PRIMARY KEY, ref REFERENCES A(id)); INSERT INTO A (v1, v2) VALUES ('test7', 7);

Re: [sqlite] wal

2019-06-28 Thread Thomas Kurz
> A WAL file left behind is a sign of a problem in the app which should be > corrected. I have exactly this problem and don't like the SHM and WAL files being left behind. I have even tried "pragma wal_checkpoint(full)" before closing the connection, but there are still situations where the

Re: [sqlite] Please explain multi-access behaviour to me

2019-06-18 Thread Thomas Kurz
This has been a very informative and helpful discussion. Thank you. So have I understood correctly, that in an application, this kind of SQLITE_BUSY handling is sufficient: BEGIN UPDATE #1 SELECT #2 UPDATE #3 COMMIT <- check for busy here and retry only the commit on failure And second,

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

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

2019-06-12 Thread Thomas Kurz
> It would also be a file format change, rendering about 1e12 existing database files obsolete. Maybe, but maybe there could be some clever implementation which doesn't break compatibility. I don't know about the exact internals of how SQlite stores values in the file. But I think there must be

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

2019-06-12 Thread Thomas Kurz
> For an SQL engine, the next-best-thing to strict binary IEEE754 is not sloppy binary IEEE754, its probably strict decimal IEEE754. That would be a *really great* improvement! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

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

2019-06-12 Thread Thomas Kurz
In the historical documents of Sqlite4, there has been a note about "distinguish whether a number is exact or approximate" (or similar). Imho this information would be more useful than distinguishing between +/- 0.0. ___ sqlite-users mailing list

Re: [sqlite] round function inconsistent

2019-05-25 Thread Thomas Kurz
> INSERT INTO t1(a,b) VALUES(2,3.254893418589635); But this is a different scenario. The value is already stored in the database as 3.255. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] round function inconsistent

2019-05-24 Thread Thomas Kurz
Sorry, I was too fast with sending. With the three values mentioned before: a) 3.255 b) 3.254999 c) 3.254893418589635 Both SQLite and MySQL (however, I used MariaDB) return these values on a simple SELECT b: a) 3.255 b) 3.254999 c) 3.255 And ROUND(b,2) returns:

Re: [sqlite] round function inconsistent

2019-05-24 Thread Thomas Kurz
Sorry, but even Excel (which usually isn't very good at decimal math) gives correct results: ROUND(3.255;2) --> 3.26 ROUND(3.254999;2) --> 3.25 Yours is clearly incorrect. - Original Message - From: Richard Hipp To: SQLite mailing list Sent: Friday, May 24, 2019, 14:44:52

Re: [sqlite] SQL Features That SQLite Does Not Implement

2019-05-23 Thread Thomas Kurz
the values should be just NULL. - Original Message - From: Simon Slavin To: SQLite mailing list Sent: Thursday, May 23, 2019, 12:34:39 Subject: [sqlite] SQL Features That SQLite Does Not Implement On 23 May 2019, at 7:57am, Thomas Kurz wrote: > CREATE VIEW foo AS SELECT {if has std

Re: [sqlite] [EXTERNAL] Re: SQL Features That SQLite Does Not Implement

2019-05-23 Thread Thomas Kurz
o an SQLite DB near you soon! Cheers, Ryan On 2019/05/23 12:19 PM, Thomas Kurz wrote: > That doesn't make any difference. Then I could use the extensions-functions.c > loadable module as well. My database has to work equally well no matter what > dll and/or extension is use

Re: [sqlite] [EXTERNAL] Re: SQL Features That SQLite Does Not Implement

2019-05-23 Thread Thomas Kurz
application startup so that it is always available to your code. This does not require checking the sqlite3.dll -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Thomas Kurz Gesendet: Donnerstag, 23. Mai 2019 11:41 An: SQLite

Re: [sqlite] [EXTERNAL] Re: SQL Features That SQLite Does Not Implement

2019-05-23 Thread Thomas Kurz
ueries run blindingly slow... BTW, what is your use case? -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Thomas Kurz Gesendet: Donnerstag, 23. Mai 2019 08:58 An: SQLite mailing list Betreff: [EXTERNAL] Re: [sqlite] SQL Features T

Re: [sqlite] SQL Features That SQLite Does Not Implement

2019-05-23 Thread Thomas Kurz
but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Thomas Kurz >Sent: Wednesday, 22 May, 2019 22:19 >To: SQLite mailing list >Subject

Re: [sqlite] SQL Features That SQLite Does Not Implement

2019-05-22 Thread Thomas Kurz
> exact numeric representations. +1 for that as had already been in consideration for version 4 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQL Features That SQLite Does Not Implement

2019-05-22 Thread Thomas Kurz
I agree in that not every math function can be included by default. My problem, however, is that I cannot know whether a user uses my self-compiled version with built-in extension-functions.c, or a downloaded version from sqlite.org. It would be very, very helpful (especially regarding views!)

Re: [sqlite] SQL Features That SQLite Does Not Implement

2019-05-22 Thread Thomas Kurz
Before starting to support SQL2016 features, I would suggest support for missing features of older SQL standard versions first ;) - Original Message - From: sky5w...@gmail.com To: SQLite mailing list Sent: Wednesday, May 22, 2019, 21:29:40 Subject: [sqlite] SQL Features That SQLite

Re: [sqlite] SQLite with single writer on Windows network share

2019-05-11 Thread Thomas Kurz
> How about you give up on the idea of using Windows shares to distribute a > SQLite DB and use a tool meant for the job, such as BedrockDB? BedrockDB is recommended here now and then, and it sounds interesting indeed. However, it's not available for Windows. (This should always be noted when

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

2019-05-04 Thread Thomas Kurz
> What about just sticking with the ISO week definition? > > https://en.wikipedia.org/wiki/ISO_week_date From the document you cited: "The ISO standard does not define any association of weeks to months." ___ sqlite-users mailing list

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

2019-05-02 Thread Thomas Kurz
I think "week of the month" is not a standard value. As with week of the year, is week #1 the week in which the month starts, the first complete week within the month, or the first week with at least 4 days? - Original Message - From: Jose Isaias Cabrera To:

Re: [sqlite] ANN: SQLite3 Decimal Extension

2019-04-04 Thread Thomas Kurz
I appreciate your effort towards this extension. In my opinion, however, this is (along with bigint-support) a feature that belongs into core (for that reason alone to get math operations, comparisons, aggregates, etc. working in an intuitive way). Years ago, for SQLite4, there seem to have

Re: [sqlite] Row locking sqlite3

2019-03-29 Thread Thomas Kurz
with which I observed this issue, I will send it to you. - Original Message - From: Dan Kennedy To: sqlite-users@mailinglists.sqlite.org Sent: Friday, March 29, 2019, 19:33:51 Subject: [sqlite] Row locking sqlite3 On 28/3/62 01:04, Thomas Kurz wrote: >> I wonder whether

Re: [sqlite] UPSERT with multiple constraints

2019-03-29 Thread Thomas Kurz
@mailinglists.sqlite.org Sent: Friday, March 29, 2019, 17:03:09 Subject: [sqlite] UPSERT with multiple constraints On Wed, 27 Mar 2019 23:59:47 +0100 Thomas Kurz wrote: > Sure. I have a table of items. Each item has a type, a name, and > properties A, B, C (and some more, but they're not re

Re: [sqlite] UPSERT with multiple constraints

2019-03-27 Thread Thomas Kurz
> Can I ask what it is that you're trying to do ? This smacks of trying to add > 1 to an existing value or something like that. Sure. I have a table of items. Each item has a type, a name, and properties A, B, C (and some more, but they're not relevant here). I want to enforce that items of a

Re: [sqlite] Row locking sqlite3

2019-03-27 Thread Thomas Kurz
Integrity check is ok. I'm deleting using primary keys only, so it shouldn't be an index problem either. - Original Message - From: Simon Slavin To: SQLite mailing list Sent: Wednesday, March 27, 2019, 19:25:17 Subject: [sqlite] Row locking sqlite3 On 27 Mar 2019, at 6:04pm, Thomas

Re: [sqlite] Row locking sqlite3

2019-03-27 Thread Thomas Kurz
> I wonder whether SQLite is treating each DELETE as a single transaction. > Could you try wrapping the main delete in BEGIN ... END and see whether that > speeds up the cascaded DELETE ? Would you be able to find timings (either in > your code or in the command-line tool) and tell us whether

[sqlite] UPSERT with multiple constraints

2019-03-27 Thread Thomas Kurz
Dear all, I have a table with multiple (in this case 2) UNIQUE constraints: UNIQUE (col1, col2) UNIQUE (col1, col3, col4, col5) Is it possible to use UPSERT twice? I have already tried some statements, but neither of these were successful. This is what I want to achieve: INSERT INTO ... ON

Re: [sqlite] Row locking sqlite3

2019-03-27 Thread Thomas Kurz
Imho quite simple: There are operations that take a long time. I observe this behavior especially with DELETE in combination with ON CASCADE DELETE. Can take half an hour, and meanwhile the database remains locked. - Original Message - From: Simon Slavin To: SQLite mailing list

Re: [sqlite] read-only database in WAL mode and temporary files

2019-03-24 Thread Thomas Kurz
if it doesn't exist at the moment for a database that uses that mode: https://www.sqlite.org/wal.html#read_only_databases You might look into the immutable option mentioned there and see if it's appropriate for your needs. On Sun, Mar 24, 2019, 2:33 AM Thomas Kurz wrote: > When I open a datab

[sqlite] read-only database in WAL mode and temporary files

2019-03-24 Thread Thomas Kurz
When I open a database in read-only mode (?mode=ro), I observe that the WAL and SHM temporary files are created anyway. Is there any possibility to prevent the creation of these files? Aren't they useless? Even worse (using sqlite3.exe version 3.27.1): .open test.db pragma journal_mode=wal;

Re: [sqlite] Row locking sqlite3

2019-03-22 Thread Thomas Kurz
(not quite as granular as row level). https://www.sqlite.org/cgi/src/doc/begin-concurrent/doc/begin_concurrent.md > On 22 Mar 2019, at 11:48 am, Thomas Kurz wrote: > This sounds interesting. I have some questions about: >> Row lock information is shared with processes. If a proc

Re: [sqlite] Row locking sqlite3

2019-03-22 Thread Thomas Kurz
This sounds interesting. I have some questions about: > Row lock information is shared with processes. If a process finished > unexpectedly, unnecessary lock information might be stayed. In order to > unlock them, please use sqlumdash_cleaner.exe which clears all record > information. If there

Re: [sqlite] Feature suggestion / requesst

2019-03-14 Thread Thomas Kurz
May I ask whether this suggestion has been considered being added to SQlite? - Original Message - From: Clemens Ladisch To: sqlite-users@mailinglists.sqlite.org Sent: Friday, June 8, 2018, 08:25:25 Subject: [sqlite] Feature suggestion / requesst Hick Gunter wrote: >> I've encountered

Re: [sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Thomas Kurz
Are both of the same architecture, either 32bit or 64bit? - Original Message - From: Kyle To: sqlite-users@mailinglists.sqlite.org Sent: Tuesday, March 5, 2019, 23:30:35 Subject: [sqlite] Problems loading extensions on Windows 10 I am having problems loading sqlite3 extensions on

Re: [sqlite] inconsistent behavior when creating INTEGER NOT NULL column without DEFAULT?

2019-02-13 Thread Thomas Kurz
> I guess a missing DEFAULT automatically implies DEFAULT NULL, so the behavior > of ALTER should be correct whilst CREATE seems to forget to reject the > statement. Sorry, I was wrong about this. The CREATE shows the correct behavior whereas ALTER incorrecty rejects the statement. According

Re: [sqlite] inconsistent behavior when creating INTEGER NOT NULL column without DEFAULT?

2019-02-13 Thread Thomas Kurz
> This is a limitation of SQLite's current ALTER TABLE implementation. Columns > can only be added with a default value of NULL, therefore NOT NULL columns > are forbidden. I don't think so because this works (shortened here; it also works with REFERENCES...): ALTER TABLE test ADD COLUMN

[sqlite] inconsistent behavior when creating INTEGER NOT NULL column without DEFAULT?

2019-02-13 Thread Thomas Kurz
I just stumbled upon the following issue (tested with 3.27.1): I can do this: CREATE TABLE test (groupid INTEGER NOT NULL REFERENCES mygroup (id) ON UPDATE CASCADE ON DELETE CASCADE); But this fails: ALTER TABLE test ADD COLUMN groupid2 INTEGER NOT NULL REFERENCES mygroup (id) ON UPDATE

Re: [sqlite] Tips for index creation

2019-02-13 Thread Thomas Kurz
/queryplanner.html (and the pages it links to) There's also the .expert command in the sqlite shell: sqlite> .expert sqlite> SELECT ... FROM ...; will suggest indexes that will benefit a particular query. On Wed, Feb 13, 2019, 4:39 AM Thomas Kurz Hello, > I apologize right at the beginning

[sqlite] Tips for index creation

2019-02-13 Thread Thomas Kurz
Hello, I apologize right at the beginning, because this is a real noob question. But I don't have much experience with performance optimization and indexes, so I'm hoping for some useful hints what indexes to create. I have queries like this: SELECT parameter, value FROM metadata WHERE id1=a

Re: [sqlite] Database locking problems

2019-01-20 Thread Thomas Kurz
Just for curiosity: how do other DBMS (MySQL, etc.) solve this issue? I guess the keypoint is that no matter where the query comes from, the database files are always under control of the same process which then can take care of the correct order in which to read and write data. But the

Re: [sqlite] WAL mode for in-memory databases?

2019-01-14 Thread Thomas Kurz
It would also be very helpful if more control about in-memory-databases was available. As far as I have understood, an in-memory database is deleted when the last connection closes. This requires me to always hold a connection to an in-memory database even if don't need it right now. Maybe one

Re: [sqlite] SQLite error (5): database is locked

2019-01-14 Thread Thomas Kurz
> pragma_busy_timeout Does setting the busy_timeout retry periodically (e.g. every x milliseconds), or is there some automatism that ensures that the requested operation is done just-in-time as soon as the previous/blocking operation is finished? ___

Re: [sqlite] Question about floating point

2018-12-17 Thread Thomas Kurz
Ok, as there seem to be some experts about floating-point numbers here, there is one aspect that I never understood: floats are stored as a fractional part, which is binary encoded, and an integer-type exponent. The first leads to the famous rounding errors as there is no exact representation

Re: [sqlite] Question about floating point

2018-12-16 Thread Thomas Kurz
> Good way to overflow your integers. > With floating point, that's not a problem. With int64, it shouldn't be a problem either. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Thomas Kurz
> I never would have allowed the recent > enhancements to ALTER TABLE that broke it. The enhancements made have been way overdue. Personally, I appreciate them very much and they are worth the "trouble". And I hope that the small problem does not prevent you from taking MODIFY COLUMN and DROP

Re: [sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Thomas Kurz
orrect and error prone... Try to create a new table, copy data over, drop the original and then rename the new one to see if that fixes the issue. On Wed, Dec 12, 2018, 8:54 AM Thomas Kurz Dear all, > I don't know whether the behavior is intentional or a bug, so let me > describe it (oc

[sqlite] ALTER TABLE, modifying columns

2018-12-12 Thread Thomas Kurz
Dear all, I don't know whether the behavior is intentional or a bug, so let me describe it (occurs since 3.25): Due to the lack of ALTER TABLE MODIFY COLUMN, I use the following construction: PRAGMA foreign_keys=0 BEGIN TRANSACTION ALTER TABLE x RENAME TO x_old CREATE TABLE IF NOT EXISTS x

Re: [sqlite] function named geopolyCosine is a misnomer

2018-11-29 Thread Thomas Kurz
Could it be that the one angle is north-based, the other one east-based? - Original Message - From: Graham Hardman To: SQLite mailing list Sent: Thursday, November 29, 2018, 12:46:05 Subject: [sqlite] function named geopolyCosine is a misnomer Hi, I was very interested in the

Re: [sqlite] Bug?: unexpected behaviour - alter parent table in a deferred foreign key relationship

2018-11-23 Thread Thomas Kurz
To what I've learned so far, SQlite stores all data "as is" into any column regardless of the column declaration. The affinity only matters upon reading, am I correct? If so, would it be a big deal implementing ALTER TABLE ALTER COLUMN? - Original Message - From: Dan Kennedy To:

Re: [sqlite] SQLite iOS timestamp type mapping settings must be set to float to get correct data

2018-11-20 Thread Thomas Kurz
> (Does SQL itself have a numeric timestamp type, or explicitly endorse the > POSIX epoch for numeric timestamps?) SQL has an explicit TIMESTAMP type since SQL-92, one thing that I'm heavily missing in SQlite ;-) ___ sqlite-users mailing list

Re: [sqlite] geopoly - rules re data entry

2018-11-18 Thread Thomas Kurz
> I discovered that >many legacy GeoJSON files do not follow the rules and put polygon >vertexes in CW order. As far as I know, the Open Geospatial Consortium defines polygons with CCW order (and iCW inner rings) as "seen from top", and an iCW exterior ring (with CCW inner rings) as "seen from

  1   2   >