Re: [sqlite] New bug: PRAGMA cache_size requires write lock on DB

2013-07-23 Thread Dan Kennedy
On 07/23/2013 01:38 AM, Philip Goetz wrote: I have a Perl program that we have run successfully every day for almost the past 2 years, but which crashes today with the error message: FATAL ERR: Can't do PRAGMA cache_size = 100: attempt to write a readonly database The SQLite database in

Re: [sqlite] Multiple autoinc columns?

2013-07-23 Thread Igor Tandetnik
On 7/24/2013 12:34 AM, Kai Peters wrote: Is it possible to have two (or more) autoincrement columns per table? No, not automatically. With some work, you could simulate it using AFTER INSERT trigger. -- Igor Tandetnik ___ sqlite-users mailing list

[sqlite] Multiple autoinc columns?

2013-07-23 Thread Kai Peters
Is it possible to have two (or more) autoincrement columns per table? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Simon Slavin
On 24 Jul 2013, at 12:04am, j.merr...@enlyton.com wrote: > I do not know if SQLite has the storage behavior that e.g. PostgreSQL and MS > SQL Server have, which is that null values take up absolutely no space. SQLite uses a one-byte 'type' indicator, followed by some bytes for the value. The

Re: [sqlite] New bug: PRAGMA cache_size requires write lock on DB

2013-07-23 Thread Richard Hipp
On Mon, Jul 22, 2013 at 2:38 PM, Philip Goetz wrote: > I have a Perl program that we have run successfully every day for > almost the past 2 years, but which crashes today with the error > message: > > FATAL ERR: Can't do PRAGMA cache_size = 100: attempt to write a >

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread j . merrill
On 07/23/2013 02:52 PM, Max Vlasov wrote: > I've created a kind of triple storage base with Sqlite db as the container. > Basically it's several tables implementing Object-Propery-Value metaphor. > There's only one field for data so thinking about generality I assumed that > the type for the data

Re: [sqlite] Sqlite locking issue with ATTACH'ed databases

2013-07-23 Thread Loren Keagle
I've narrowed this locking issue down to a very simply test case. It seems as though having the same file attached multiple times with different names prevents exclusive or immediate transactions from acquiring a lock. Deferred transactions still seem to work fine. Try the following code:

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
On Tue, Jul 23, 2013 at 10:09 PM, Petite Abeille wrote: > > On Jul 23, 2013, at 9:52 AM, Max Vlasov wrote: > > > Basically it's several tables implementing Object-Propery-Value metaphor > > Hurray! The Entity–attribute–value (EAV) anti-pattern! > >

[sqlite] Compile option documentation conflict

2013-07-23 Thread Ben
There is a minor conflict in the online documentation. This page: http://www.sqlite.org/fts3.html#section_2 States that: "There is not a separate SQLITE_ENABLE_FTS4 compile-time option" and that enabling FTS3 also includes FTS4 support. This page: http://www.sqlite.org/compile.html States that

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Petite Abeille
On Jul 23, 2013, at 9:52 AM, Max Vlasov wrote: > Basically it's several tables implementing Object-Propery-Value metaphor Hurray! The Entity–attribute–value (EAV) anti-pattern! "… an EAV based approach is an anti-pattern which can lead to longer development times, poor

Re: [sqlite] sqlite on ESXI hypervisor

2013-07-23 Thread Rob Willett
Hi, Apologies for jumping in here. I was interested in your question as I have some development going on which will eventually go into production on a VMWare ESXI server, which could be either Linux or Windows. When you say you are running sqlite3 on esxi5 do you mean that you are running

Re: [sqlite] Access Permission on Table

2013-07-23 Thread techi eth
I am getting request from different process for different SQlite3 operation to be performed. Here I want to restrict Update/Alter/Drop operation to creator of the table but read can be done by all. I am using sqlite3_exec() for query execution. In those scenarios can I directly map

Re: [sqlite] sqlite on ESXI hypervisor

2013-07-23 Thread Clemens Ladisch
1 1 wrote: > I've tried to run the latest version of sqlite3 on esxi 5.0 (VMware > hypervisor), but unsuccessfully. Strace shows "fcntl function not > implemended". Apparently, VMFS does not implement file locking. Try using the unix-dotfile VFS, or unix-none if you can guarantee that the

Re: [sqlite] Memory Access

2013-07-23 Thread Simon Slavin
On 23 Jul 2013, at 12:26pm, techi eth wrote: > I would like to check how we can restrict SQLite3 for more > updating/dropping (I think this two will restrict flash life) based on > memory life. > > If I say my flash will support ‘N’ Thousand access over the life time. You

[sqlite] New bug: PRAGMA cache_size requires write lock on DB

2013-07-23 Thread Philip Goetz
I have a Perl program that we have run successfully every day for almost the past 2 years, but which crashes today with the error message: FATAL ERR: Can't do PRAGMA cache_size = 100: attempt to write a readonly database The SQLite database in question is readonly (group and world have only

[sqlite] sqlite on ESXI hypervisor

2013-07-23 Thread 1 1
Hello. I've tried to run the latest version of sqlite3 on esxi 5.0 (VMware hypervisor), but unsuccessfully. Strace shows "fcntl function not implemended". Older versions return "disk i/o errors" or "database is locked" then create table request invoked. Do you have any ideas how to resolve

Re: [sqlite] SQLITE_BUSY on rare occasions, single thread, single connection

2013-07-23 Thread RSmith
- You have another open operation or transaction which has not been committed or finalized or in some way completed. If I only have one connection, there can't be another uncommitted transaction? Well there can be, which would cause a BUSY signal. Unless you've had success beginning the new

[sqlite] Memory Access

2013-07-23 Thread techi eth
I would like to check how we can restrict SQLite3 for more updating/dropping (I think this two will restrict flash life) based on memory life. If I say my flash will support ‘N’ Thousand access over the life time. Cheers- Techi ___ sqlite-users

Re: [sqlite] SQLITE_BUSY on rare occasions, single thread, single connection

2013-07-23 Thread Jesper Baekdahl
Thank you all very much for your answers.. On Mon, Jul 22, 2013 at 9:07 AM, RSmith wrote: > - You have another open operation or transaction which has not been > committed or finalized or in some way completed. If I only have one connection, there can't be another

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Dan Kennedy
On 07/23/2013 04:53 PM, Max Vlasov wrote: On Tue, Jul 23, 2013 at 1:38 PM, Dan Kennedy wrote: On 07/23/2013 02:52 PM, Max Vlasov wrote: So par adoxically probably the best type for universal field container is REAL (or NUMERIC) since it will accept data of any

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Clemens Ladisch
Max Vlasov wrote: > On Tue, Jul 23, 2013 at 1:32 PM, Clemens Ladisch wrote: >> But REAL will sort the strings '1', '10', '2' wrong. > > What do you mean by "wrong"? > > 1, 2, 10, something > that's what I wanted So you actually want to sort strings as if they were numbers (if

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
On Tue, Jul 23, 2013 at 1:38 PM, Dan Kennedy wrote: > On 07/23/2013 02:52 PM, Max Vlasov wrote: > >> So >> par adoxically probably the best type for universal field container is >> REAL >> (or NUMERIC) since it will accept data of any type, but has advantage of >>

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
On Tue, Jul 23, 2013 at 1:32 PM, Clemens Ladisch wrote: > > > But REAL will sort the strings '1', '10', '2' wrong. > What do you mean by "wrong"? The test CREATE TABLE testtable (id integer primary key, value real); insert into testtable (value) values ('1'); insert into

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Dan Kennedy
On 07/23/2013 02:52 PM, Max Vlasov wrote: I've created a kind of triple storage base with Sqlite db as the container. Basically it's several tables implementing Object-Propery-Value metaphor. There's only one field for data so thinking about generality I assumed that the type for the data field

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Clemens Ladisch
Max Vlasov wrote: > I've created a kind of triple storage base with Sqlite db as the container. > Basically it's several tables implementing Object-Propery-Value metaphor. > There's only one field for data so thinking about generality I assumed that > the type for the data field should be TEXT of

[sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
I've created a kind of triple storage base with Sqlite db as the container. Basically it's several tables implementing Object-Propery-Value metaphor. There's only one field for data so thinking about generality I assumed that the type for the data field should be TEXT of nothing since most of