[sqlite] How-to and best practice for session extension

2017-06-12 Thread Robert M. Münch
Hi, we want to use the Session extension to implement an UNDO system for our application. We did some first steps using it and now a couple of questions came up: 1. Is it correct that schema changes are not tracked and can't be part of a changeset? So any ALTER TABLE command needs to be taken

Re: [sqlite] Something broke between version 3.15 and 3.19.3

2017-06-12 Thread Balaji Ramanathan
Thank you very much, Simon. I was able to downgrade to 3.18 using your instructions and everything seems to work now. Balaji Ramanathan On 11 Jun 2017, at 2:56pm, Balaji Ramanathan wrote: > This is going to sound stupid, but I would like to know how to > download

Re: [sqlite] Something broke between version 3.15 and 3.19.3

2017-06-12 Thread Balaji Ramanathan
I am glad you were able to fix it quickly. I assume the next version of SQLite (3.19.4 or 3.20 or whatever) will include the fix? Thank you. Balaji Ramanathan On 6/11/17, Balaji Ramanathan wrote: > > Everything was working fine under 3.15. I just use the

Re: [sqlite] Can I increase the performance of sqlite3_exec() or maybe change it to prepare+step?

2017-06-12 Thread Hick Gunter
"many (sometimes several thousand) statments" sounds like it could be heavy on memory requirements. Are you inserting one row per statement or all rows in one statement? The latter would be really hard on memory because SQLite will have to parse the whole statement and generate a gigantic SQL

Re: [sqlite] Can I increase the performance of sqlite3_exec() or maybe change it to prepare+step?

2017-06-12 Thread Simon Slavin
On 12 Jun 2017, at 3:53pm, Венцислав Русев wrote: > To migrate a DB from version 3 to version 7 the C program does the following: This migration is a one-time process, right ? Each customer has to do it only once, then never again. It not like they have to wait through

[sqlite] System.Data.SQLite version 1.0.105.2 released

2017-06-12 Thread Joe Mistachkin
System.Data.SQLite version 1.0.105.2 (with SQLite 3.19.3) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the

Re: [sqlite] sqlite.org port 80 - can't connect

2017-06-12 Thread jungle Boogie
On 12 June 2017 at 01:03, Richard Hipp wrote: > On 6/12/17, jungle boogie wrote: >> Hi All, >> >> curl: (7) Failed to connect to www.sqlite.org port 80: Connection refused > > xinetd keeps crashing. Dunno why. I've restarted it. I think it died again.

Re: [sqlite] Unable to create index on attached database

2017-06-12 Thread Chris Peachment
Thank you - the only combination that I did not try works :( On Mon, 12 Jun 2017 08:17:01 + Hick Gunter wrote: > Try > > Create index t2.idx on link (...) > > Which is what the syntax diagram would recommend. If you ask SQLite > to create an index in t2, it will figure

Re: [sqlite] How-to and best practice for session extension

2017-06-12 Thread Simon Slavin
On 12 Jun 2017, at 2:48pm, Robert M. Münch wrote: > Hi, we want to use the Session extension to implement an UNDO system for our > application. We did some first steps using it and now a couple of questions > came up: > > 1. Is it correct that schema changes are

[sqlite] invalid column constraint ignored

2017-06-12 Thread gwenn
Hello, I suppose it is a trade-off to make the parser light and fast. But invalid column constraints are ignored. sqlite> create table tbl (data text constraint x); postgres=# create table tbl (data text constraint x); ERROR: syntax error at or near ")" at character 41 sqlite> create table tbl

[sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread Scott Robison
This is as much out of curiosity as anything. I know that to get the rowid aliasing behavior for a table one must define the column type as INTEGER and using the constraint PRIMARY KEY. Something like: CREATE TABLE A(B INTEGER PRIMARY KEY); In testing this afternoon I was curious if I could give

Re: [sqlite] invalid column constraint ignored

2017-06-12 Thread Richard Hipp
On 6/12/17, gwenn wrote: > invalid column constraints are ignored. This is a consequence of designing SQLite according to Postel's Law (https://en.wikipedia.org/wiki/Robustness_principle) which was very popular 17 years ago when SQLite was being designed, but nowadays has

Re: [sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread Simon Slavin
On 12 Jun 2017, at 11:01pm, Scott Robison wrote: > Is it fair to say that the rowid aliasing behavior does not require > (by design) the incantation "INTEGER PRIMARY KEY" (all three words in > that order as the "type") as long as the type is INTEGER and the >

Re: [sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread Scott Robison
On Mon, Jun 12, 2017 at 4:20 PM, Simon Slavin wrote: > > > On 12 Jun 2017, at 11:01pm, Scott Robison wrote: > >> Is it fair to say that the rowid aliasing behavior does not require >> (by design) the incantation "INTEGER PRIMARY KEY" (all three

Re: [sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread Richard Hipp
On 6/13/17, Scott Robison wrote: > > Is it fair to say that the rowid aliasing behavior does not require > (by design) the incantation "INTEGER PRIMARY KEY" (all three words in > that order as the "type") as long as the type is INTEGER and the > constraint PRIMARY KEY

[sqlite] Is sqlite3_auto_extension() same compilation unit ruled out?

2017-06-12 Thread petern
I have a situation where it would be convenient to locate externally loadable SQLite extension code in the same compilation unit as the server code. Is there a way for server main() to load those extensions located within its own compilation unit? Does the necessity of #including both sqlite3.h

Re: [sqlite] Can I increase the performance of sqlite3_exec() or maybe change it to prepare+step?

2017-06-12 Thread Keith Medcalf
On Monday, 12 June, 2017 08:53, Венцислав Русев wrote: > I am using sqlite C API to migrate a database. Migration consists of > many SQL statements that are known in advance. > To migrate a DB from version 3 to version 7 the C program does the > following: > 1.

Re: [sqlite] Is sqlite3_auto_extension() same compilation unit ruled out?

2017-06-12 Thread David Burgess
Have a look at the way readfile() and writefile() is implemented in the sqlite interpreter. On Tue, Jun 13, 2017 at 10:38 AM, petern wrote: > I have a situation where it would be convenient to locate externally > loadable SQLite extension code in the same

Re: [sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread David Burgess
> But we have to preserve backwards compatibility - even with bugs > like this. ​How about a new release? i.e. sqlite4 No backward compatibilty issues.​ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread Scott Robison
On Jun 12, 2017 5:43 PM, "Richard Hipp" wrote: On 6/13/17, Scott Robison wrote: > > Is it fair to say that the rowid aliasing behavior does not require > (by design) the incantation "INTEGER PRIMARY KEY" (all three words in > that order as the "type")

Re: [sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread Scott Robison
On Jun 12, 2017 8:26 PM, "Keith Medcalf" wrote: Additionally, declaring NOT NULL or NULL is ignored. CHECK constraints are honoured. DEFAULT values are ignored. so CREATE TABLE x(id INTEGER NULL PRIMARY KEY CHECK (id>1000) DEFAULT (-1)); & CREATE TABLE x(id INTEGER NULL

Re: [sqlite] Can I increase the performance of sqlite3_exec() or maybe change it to prepare+step?

2017-06-12 Thread Simon Slavin
On 12 Jun 2017, at 4:20pm, Simon Slavin wrote: > Please add the ANALYZE command after your existing VACUUM. Before. Not after. Do ANALYZE, then VACUUM. It might make no difference but technically it may yield a faster result. Or a smaller file. Something good. >

Re: [sqlite] INTEGER PRIMARY KEY

2017-06-12 Thread Keith Medcalf
Additionally, declaring NOT NULL or NULL is ignored. CHECK constraints are honoured. DEFAULT values are ignored. so CREATE TABLE x(id INTEGER NULL PRIMARY KEY CHECK (id>1000) DEFAULT (-1)); & CREATE TABLE x(id INTEGER NULL PRIMARY KEY CHECK (id>1000)); is CREATE TABLE x(id INTEGER PRIMARY

Re: [sqlite] sqlite.org port 80 - can't connect

2017-06-12 Thread Richard Hipp
On 6/12/17, jungle boogie wrote: > Hi All, > > curl: (7) Failed to connect to www.sqlite.org port 80: Connection refused xinetd keeps crashing. Dunno why. I've restarted it. Port 443 was still up. Also ports 80 and 443 on www2.sqlite.org and www3.sqlite.org. -- D.

Re: [sqlite] Unable to create index on attached database

2017-06-12 Thread Hick Gunter
Try Create index t2.idx on link (...) Which is what the syntax diagram would recommend. If you ask SQLite to create an index in t2, it will figure out that the table needs to be in t2 too. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]

[sqlite] Outputting to CSV - row is not quoted when there are no spaces

2017-06-12 Thread dan
Hi, When outputting to CSV with '.mode csv' is there a way that all rows can be quoted even if there are no spaces? For example, here is a 1 line from the output: spotify:track:5vlDIGBTQmlyfERBnJOnbJ,Kiso,Circles,100.019 I would like it to output:

[sqlite] Unable to create index on attached database

2017-06-12 Thread Chris Peachment
Hello All: Is this a bug or am I doing something wrong? Note: neither test.db nor t2.db exist prior to this test. $ sqlite3 test.db SQLite version 3.19.2 2017-05-25 16:50:27 Enter ".help" for usage hints. sqlite> create table account (id integer primary key, idParent integer); sqlite> attach

[sqlite] sqlite.org port 80 - can't connect

2017-06-12 Thread jungle boogie
Hi All, curl: (7) Failed to connect to www.sqlite.org port 80: Connection refused https is working fine: curl --head https://www.sqlite.org HTTP/1.1 200 OK Connection: keep-alive Date: Mon, 12 Jun 2017 07:37:35 + Last-Modified: Fri, 09 Jun 2017 14:05:33 + Content-type: text/html;

[sqlite] Can I increase the performance of sqlite3_exec() or maybe change it to prepare+step?

2017-06-12 Thread Венцислав Русев
Hello, I am using sqlite C API to migrate a database. Migration consists of many SQL statements that are known in advance. To migrate a DB from version 3 to version 7 the C program does the following: 1. disable foreign_keys (PRAGMA foreign_keys = OFF); 2. open transaction (BEGIN

Re: [sqlite] Outputting to CSV - row is not quoted when there are no spaces

2017-06-12 Thread Richard Hipp
SQLite does not provide that capability, that I recall. But surely it would not be too difficult for you to do your own custom patch, or even to write a short program to output the data in the precise format you desire? On 6/12/17, d...@dan.bz wrote: > Hi, > > When outputting to