[sqlite] ALTER TABLE

2018-05-22 Thread Thomas Kurz
I'd like to ask whether there is hope for a more complete support of ALTER TABLE in the near future, i.e. ADD COLUMN, MODIFY COLUMN, RENAME COLUMN and DROP COLUMN. I know about the workaround (alter table rename to, insert, drop table), but this is very inconvenient.

Re: [sqlite] ALTER TABLE

2018-05-22 Thread Thomas Kurz
tes, and do a INSERT INTO ... SELECT FROM > > old_table. Then you can safely drop the old table. > But the table_name will be different. > Also the data in the old table might be referencing some other table. > So this process is not really very > straightforward... > Thank you. > >

Re: [sqlite] After update from 3.20 to 3.23 alter table throws error for boolean with default value FALSE

2018-05-17 Thread Thomas Kurz
> I think I'm not alone in wishing there was a way to disable all legacy backward compatibility "warts". +1 for that ;-) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] ALTER TABLE

2018-05-22 Thread Thomas Kurz
> ALTER TABLE ADD COLUMN has existed for a long time. Yes, sorry, I mixed things up. The order of importance is imho: 1. RENAME COLUMN (shouldn't be too hard) 2. DROP COLUMN (should be a bit more comlicated but feasible) 3. MODIFY COLUMN > What kind of MODIFY COLUMN changes do you have in mind?

Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-10 Thread Thomas Kurz
I suggest using a tmp directory within in your private app directory. - Original Message - From: skywind mailing lists To: SQLite mailing list Sent: Sunday, June 10, 2018, 18:44:45 Subject: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail Hi, but to

Re: [sqlite] Selecting multiple similar columnname.

2018-06-08 Thread Thomas Kurz
Why don't you store the values in a different table consisting only of the fields "satellite id/number", and "strength", and a link to the appropriate row in the source table (the one that contains the timestamp) ? - Original Message - From: Mukesh Kumar To: SQLite mailing list Sent:

Re: [sqlite] Size of the SQLite library

2018-05-31 Thread Thomas Kurz
I totally agree with that. On most systems it is much more important to have a feature-rich library than a very small one. Any application where a few bytes more or less matter should be written in pure assembler anyway. - Original Message - From: Dominique Devienne To: General

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-03 Thread Thomas Kurz
> One problem with having an actual internal date format is how to dump it into > a text file or to a text interface. You end up turning it into a number or a > string anyway, so you might was well store it that way. The problem not having a DATETIME field is, however, very simple: When

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-02 Thread Thomas Kurz
Are there any plans to implement a DATETIME and/or TIMESTAMP field types? - Original Message - From: Simon Slavin To: SQLite mailing list Sent: Saturday, June 2, 2018, 21:04:10 Subject: [sqlite] Subject: Re: SQL Date Import On 2 Jun 2018, at 7:32pm, dmp wrote: > By the way, most

Re: [sqlite] column types and constraints

2018-06-29 Thread Thomas Kurz
> At least, enough-so in my mind to defend David's assessment of "an > excellent decision". Sorry, I cannot follow the point. a) Why would I put strings in an integer column? If I need to do so, I have a concept error in my database schema. b) I think that noone wants type affinity to be

Re: [sqlite] column types and constraints

2018-06-29 Thread Thomas Kurz
> Indeed, but that option does exist, it's called CHECK constraints You're clearly right, but from my point of view, it's redundant to say COLUMN xy INTEGER CHECK type=integer, because "COLUMN INTEGER" already implies that the column is integer. And, btw, as CHECK already exists, it shouldn't

Re: [sqlite] column types and constraints

2018-06-30 Thread Thomas Kurz
> And yes, you might think (like me) that this is silly and they should > just fix it, warning people about the new way for a good few versions, > and then just roll it out. But, that would mean there will exist schemas Hmmm... but what kind of compatibility issues would you see if SQLite

Re: [sqlite] column types and constraints

2018-06-30 Thread Thomas Kurz
> I don't disagree, but this means we lose sight of the important point >that, if you distill the problem to just "INTEGER", then sure, it looks > silly, and sure, you can fix it with internal auto-CHECKing, but in > SQLite the type affinity INTEGER stands father to LONGINT, MEDIUMINT, Ok, I

Re: [sqlite] column types and constraints

2018-06-30 Thread Thomas Kurz
> You "put" a ieee754 floating point double. No I don't, I put a string ;-) I am not complaining that I can put anything anywhere. But the data type that I provide should be kept. When providing a string, it should be stored as such to have the possibility to get back the original value. When

Re: [sqlite] column types and constraints

2018-06-30 Thread Thomas Kurz
> H2, HSQL Both are Java crap. SQLite is unfortunately the only embedded DBMS that gets along with a single file for both the library and the database files. (At least it's the only I know after scaning various systems.) ___ sqlite-users mailing list

Re: [sqlite] column types and constraints

2018-06-30 Thread Thomas Kurz
> when in fact it was the third-party interface wrapper. The examples I provided were all taken from the current sqlite3.exe cli with 3.24.0 library. It is not a third-party issue. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] LIMIT

2018-07-01 Thread Thomas Kurz
> Don't want to spoil any news, it is viewable by the public anyway, but there > are clearly experimental, interesting (and significant) work ongoing by the > SQLite developers around SQL windowing functions. A quick look to the > exp-window-functions branch clearly shows that. They are part

Re: [sqlite] How to Handle BigInt

2018-05-03 Thread Thomas Kurz
Are there any plans for supporting a true BigInt/HugeInt data type (i.e. without any length restriction) in the near future? - Original Message - From: Simon Slavin To: SQLite mailing list Sent: Wednesday, May 2, 2018,

Re: [sqlite] Unsigned

2018-08-25 Thread Thomas Kurz
> What is the value of a built-in UNSIGNED type when we already have INTEGER? > I can't think of any. -- Darren Duncan Signed integers only allow half the range of values of unsigned ones. You cannot store a pointer value in them. (You can by casting to signed, but then sorting is done

Re: [sqlite] Unsigned

2018-08-22 Thread Thomas Kurz
+1 for that or a true bignum support (i.e. without any length restriction). The latter would be perfect as it would provide support for storing numbers of encryption keys (RSA, etc.). And it would also avoid the problem of having to extend the bigint range again in a couple of years. -

Re: [sqlite] Unsigned

2018-08-26 Thread Thomas Kurz
> But, as noted, you could just store those as blobs, bigendian if you want > sorting, and indexing will work just fine. No other conversion needed. Yes, I can store *anything* as blobs. When arguing like this, we wouldn't need strings, dates, floats or any other type neither.

[sqlite] CHECK IGNORE?

2018-07-09 Thread Thomas Kurz
Hello, is there a way to have Sqlite ignore check violations? I would like to do: CREATE TABLE (name TEXT NOT NULL CHECK (name<>'') ON CONFLICT IGNORE but the "on conflict" is not accepted here. ___ sqlite-users mailing list

Re: [sqlite] CHECK IGNORE?

2018-07-09 Thread Thomas Kurz
ind regards, Thomas - Original Message - From: Richard Hipp To: SQLite mailing list Sent: Monday, July 9, 2018, 22:03:29 Subject: [sqlite] CHECK IGNORE? On 7/9/18, Thomas Kurz wrote: > is there a way to have Sqlite ignore check violations? https://www.sqlite.org/pragma.html#p

Re: [sqlite] CHECK IGNORE?

2018-07-09 Thread Thomas Kurz
> Yes. The ON CONFLICT clause goes in the INSERT command. Ok, thank you very much. However, this is a bit confusing as e.g. this works fine: CREATE TABLE test (col1 TEXT UNIQUE ON CONFLICT IGNORE); May I suggest the appropriate extension for CHECK ON CONFLICT IGNORE or is there a thoughtful

Re: [sqlite] What happens when a call contains two SQL statement

2018-07-09 Thread Thomas Kurz
As far as I know you have to purchase the documents. - Original Message - From: Aaron Elkins To: SQLite mailing list Sent: Monday, July 9, 2018, 14:57:07 Subject: [sqlite] What happens when a call contains two SQL statement Hi Ryan, Thank you for the interesting explanations for SQL

Re: [sqlite] To use or not to use single quotes with integers

2018-04-12 Thread Thomas Kurz
Dear Simon, > A similar thing happens when you specify that a column has affinity of REAL. > In both cases, SQLite considers that the CREATE command knows better than > whatever specifies the value, and does the conversion. However for the > number to be stored the conversion has to be

[sqlite] Before Insert/Update Trigger

2018-03-31 Thread Thomas Kurz
Other DBMS support the following construct in a trigger: CREATE TRIGGER name BEFORE UPDATE ON table FOR EACH ROW BEGIN SET NEW.column = anyvalue END; In SQLite, the NEW record appearently is read-only. Support for changeable NEW records would however be graceful as it automatically prevents

Re: [sqlite] copmile SQLite with extension?

2018-04-26 Thread Thomas Kurz
re's a Highway to Hell 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: Thursday, 26 April, 2018 06:06 >To: SQLite mail

[sqlite] copmile SQLite with extension?

2018-04-26 Thread Thomas Kurz
I have a project with heavily uses the libsqlitefunctions extension. It is a bit annoying to "select load_extension('...')" for every connection. Is it possible to compile an sqlite.dll which already has the extension embedded so that the functions provided can be used without further

Re: [sqlite] column types and constraints

2018-06-28 Thread Thomas Kurz
I understand that you do not want to break compatibility. But couldn't a PRAGMA STRICT_SQL (or the like) be introduced that would force to a) reject CREATE statements with unknown declarations (I often use "STRING" for the datatype, leading to hard-to-find problems as SQLite uses a numeric type

[sqlite] support for SHOW?

2018-10-11 Thread Thomas Kurz
Hello, I'd like to ask whether it would be possible to add support for MySQL-style SHOW command, i.e. - SHOW TABLES [FROM db_name] - SHOW COLUMNS FROM table I know that this information can be retrieved in other ways, but imho SHOW is an easy-to-remember statement and could simplify things a

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Thomas Kurz
Could the problem arise due to filesystem corruption? Have you tried an fsck? - Original Message - From: R Smith To: sqlite-users@mailinglists.sqlite.org Sent: Friday, October 12, 2018, 17:35:28 Subject: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked On 2018/10/12

Re: [sqlite] geopoly data input options

2018-10-19 Thread Thomas Kurz
> Beginning with the next release, polygons will always be stored in the > binary format. Is the SQLite binary encoding identical to the Well-Known-Binary geometry format? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] geopoly data input options

2018-10-19 Thread Thomas Kurz
mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Thomas Kurz >Sent: Friday, 19 October, 2018 09:17 >To: SQLite mailing list >Subject: Re: [sqlite] geopoly data input options >> Beginning with the next release, polygons will always be stored in >the >> binary format. >I

[sqlite] use column alias in same SELECT

2018-10-31 Thread Thomas Kurz
Dear all, may I ask whether there is a deeper reason why using a column alias in the same SELECT query doesn't work, e.g. SELECT column1 AS a, 5*column2 AS b, a+b FROM... This is not an SQlite issue, it doesn't work in MariaDB either. It would, however, be very handy if it worked.

Re: [sqlite] use column alias in same SELECT

2018-10-31 Thread Thomas Kurz
in same SELECT On 2018/10/31 9:21 PM, Simon Slavin wrote: > On 31 Oct 2018, at 7:14pm, Thomas Kurz wrote: >> may I ask whether there is a deeper reason why using a column alias in the >> same SELECT query doesn't work, e.g. >> SELECT column1 AS a, 5*c

Re: [sqlite] Regarding CoC

2018-10-26 Thread Thomas Kurz
> What'da ya think? That's a great idea. I've already had some concerns that SQLite development might cease now. Hoping for great new features in the next release :-) -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list

Re: [sqlite] forming sqlite3_statements using stored sql

2018-11-01 Thread Thomas Kurz
> Rather than inserting the SQL into a user-visible table, it might be preferable to support CREATE PROCEDURE. +1 for that ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] forming sqlite3_statements using stored sql

2018-11-02 Thread Thomas Kurz
My opinion is that the logic for database queries should be held together with the data. I don't think that embedded vs. non-embedded makes a difference here. One could as well use a MySQL or whatsoever database, and the application code still owned and create the database. This will always be

Re: [sqlite] Broken Foreign key

2018-11-13 Thread Thomas Kurz
Ok, now I understand. Thank you (and Richard) very much. - Original Message - From: Keith Medcalf To: SQLite mailing list Sent: Tuesday, November 13, 2018, 14:06:11 Subject: [sqlite] Broken Foreign key On Tuesday, 13 November, 2018 05:47, Thomas Kurz asked: >May I ask why par

Re: [sqlite] Broken Foreign key

2018-11-13 Thread Thomas Kurz
May I ask why parent keys *must* have indexes? I don't see any correlation between enforcing a client/parent-relationship and the necessity for an index. I'm just asking to better understand. To me it is clear that the parent column is to be declared as PRIMARY KEY or UNIQUE, but why does it

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Thomas Kurz
No, it's PRAGMA table_info (...); - Original Message - From: Igor Tandetnik To: sqlite-users@mailinglists.sqlite.org Sent: Friday, September 28, 2018, 15:35:30 Subject: [sqlite] How to retrieve table names for the given string On 9/28/2018 2:16 AM, Revathi Narayanan wrote: > Thanks

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

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

[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] 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

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] 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] 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] Version 3.25.0

2018-09-15 Thread Thomas Kurz
Thank you very much for the ALTER TABLE RENAME COLUMN support. That already helps very much! - Original Message - From: D. Richard Hipp To: sqlite-annou...@mailinglists.sqlite.org Sent: Saturday, September 15, 2018, 20:46:24 Subject: [sqlite-announce] Version 3.25.0 SQLite version

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

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

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

[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] 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

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

[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] 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

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

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

[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] 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] [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
> 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
> 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
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] 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] 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] 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
> 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
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] 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] [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] 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] 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] [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] 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] [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] 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] 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

[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] 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-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] [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] 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] 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

  1   2   >