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

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

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

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

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

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

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

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

<    1   2