Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/11/2010 06:26 AM, jeff archer wrote: > The overall design and structure of applications using SQLite and > therefor SQLite itself would benefit from SQLite supporting stored > procedures. SQLite includes mechanisms to implement almost

Re: [sqlite] Constraint name?

2010-11-11 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/11/2010 09:40 PM, Roger Binns wrote: > A ticket that has been open on this topic since January 2006. Oops, forgot to paste: http://www.sqlite.org/src/tktview?name=23b2128201 Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10

Re: [sqlite] Constraint name?

2010-11-11 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/11/2010 11:12 AM, Petite Abeille wrote: > Is there a way, short of parsing the original DDL, to retrieve a constraint > name? [..] > How does one retrieve the unique constraint name, "foo_uk"? A ticket that has been open on this topic since

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Chris Wolf
Olaf Schmidt wrote: > "Petite Abeille" schrieb > >> On Nov 11, 2010, at 8:30 PM, Olaf Schmidt wrote: >> >> >>> If such an "encapsulation of business-rules" is sitting in the >>> DB itself - written in a proprietary "DB-dialect", then you >>> cannot call such a thing a "business-layer"

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Olaf Schmidt
"Petite Abeille" schrieb > > On Nov 11, 2010, at 8:30 PM, Olaf Schmidt wrote: > > > If such an "encapsulation of business-rules" is sitting in the > > DB itself - written in a proprietary "DB-dialect", then you > > cannot call such a thing a "business-layer" anymore. > > Nonsense :)) Of

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread P Kishor
On Thu, Nov 11, 2010 at 5:36 PM, Petite Abeille wrote: > > On Nov 12, 2010, at 12:31 AM, Jay A. Kreibich wrote: > >>  There have been many proposals to do just this, and in specific, >>  with Lua.  Outside of some moderate technical issues, the >>  big problem is the

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Petite Abeille
On Nov 12, 2010, at 12:31 AM, Jay A. Kreibich wrote: > There have been many proposals to do just this, and in specific, > with Lua. Outside of some moderate technical issues, the > big problem is the license. Something like that would *never* > be part of the SQLite core because the Lua

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Jay A. Kreibich
On Thu, Nov 11, 2010 at 09:05:15PM +0100, Petite Abeille scratched on the wall: > Or perhaps SQLite should embed Lua [1] as its powerful, fast, > lightweight, scripting language and be done with it :) There have been many proposals to do just this, and in specific, with Lua. Outside of some

[sqlite] Lua-in-SQLite (was: Question about SQLite features.)

2010-11-11 Thread Drake Wilson
Quoth Petite Abeille , on 2010-11-11 21:05:15 +0100: > Or perhaps SQLite should embed Lua [1] as its powerful, fast, lightweight, > scripting language and be done with it :) Interestingly enough, there's problems with doing that with stock Lua: SQLite insists on having

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Petite Abeille
On Nov 10, 2010, at 11:05 AM, Andy Gibbs wrote: >> That's I don't know SQLite have stored procedure support? >> > > How're your C skills? Or perhaps SQLite should embed Lua [1] as its powerful, fast, lightweight, scripting language and be done with it :) [1] http://www.lua.org/about.html

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Petite Abeille
On Nov 11, 2010, at 8:30 PM, Olaf Schmidt wrote: > If such an "encapsulation of business-rules" is sitting in the > DB itself - written in a proprietary "DB-dialect", then you > cannot call such a thing a "business-layer" anymore. Nonsense :)) In any case, for these of us who do want to be

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Olaf Schmidt
"jeff archer" schrieb >From: "Olaf Schmidt" >Wednesday, November 10, 2010 9:07:19 AM > >>[Stored procedures in SQLite] >> >>IMO stored procedure-support only makes sense in >> "Server-Instances" which run on their own... > I disagree. The overall design and structure of > applications using

[sqlite] Constraint name?

2010-11-11 Thread Petite Abeille
Hello, Is there a way, short of parsing the original DDL, to retrieve a constraint name? For example, given: create table foo ( bar text, constraint foo_uk unique( bar ) ) How does one retrieve the unique constraint name, "foo_uk"? Thanks. Cheers, PA.

Re: [sqlite] Bugreport: sqlite dot commands should return a vaild returncode

2010-11-11 Thread chris.com
Jon, I don't agree. You may be right about the ATTACH behaviour. But the fact remains : sqlite3 doesn't return a proper exit code for dot commands. Furthermore the error messages for SQL commands appear on stdout A dot command : $ echo ".import /dev/null does_not_exist" | sqlite3 lala.db

Re: [sqlite] 5 GB DB with a 51 GB wal file.

2010-11-11 Thread Teg
Hello Teg, Thursday, November 11, 2010, 12:08:23 PM, you wrote: T> I have a 5GB DB file, 5 simple tables. Several million entries. When I T> tried to delete perhaps 10% of the entries. The WAL file blew up to T> 51 GB, 10 times bigger than the DB file itself. I understand the T> problem I

[sqlite] 5 GB DB with a 51 GB wal file.

2010-11-11 Thread Teg
I have a 5GB DB file, 5 simple tables. Several million entries. When I tried to delete perhaps 10% of the entries. The WAL file blew up to 51 GB, 10 times bigger than the DB file itself. I understand the problem I think, with long transactions and have since split the transactions up into

[sqlite] Database deleted from file system while other open connections exist.

2010-11-11 Thread Dennis Suehr
Hello, Apologies if an answer to my query exists elsewhere. I have been searching for a fair while without success. I am building an SQLite interface as a C shared library and consequently will have no knowledge or control of concurrent connections to any databases which are created by it. I

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Kees Nuyt
On Thu, 11 Nov 2010 06:26:31 -0800 (PST), jeff archer wrote: >>From: "Olaf Schmidt" >>Wednesday, November 10, 2010 9:07:19 AM >> >>[Stored procedures in SQLite] >> >>IMO stored procedure-support only makes sense in "Server-Instances" which run >>on >>their

Re: [sqlite] Ratio of test code to database code

2010-11-11 Thread Simon Slavin
On 11 Nov 2010, at 1:41pm, Dr. David Kirkby wrote: > On 11/10/10 04:28 PM, Roger Binns wrote: > >> The SQLite developers decided their library will always be reliable and >> greatly care about data integrity hence the amount of testing. > > I wish the Sage developers would take as much care.

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread jeff archer
>From: "Olaf Schmidt" >Wednesday, November 10, 2010 9:07:19 AM > >[Stored procedures in SQLite] > >IMO stored procedure-support only makes sense in "Server-Instances" which run >on >their own... I disagree.  The overall design and structure of applications using SQLite and

Re: [sqlite] Ratio of test code to database code

2010-11-11 Thread Dr. David Kirkby
On 11/10/10 08:58 PM, Samuel Adam wrote: > On Wed, 10 Nov 2010 08:53:40 -0500, Dr. David Kirkby > wrote: > >> Someone recently said he felt that a test:code ratio of 1:1 is about >> optimal, so > > Where do people get notions like this? Cf.: I don't know. In fact, I

Re: [sqlite] Ratio of test code to database code

2010-11-11 Thread Dr. David Kirkby
On 11/10/10 04:28 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/10/2010 05:53 AM, Dr. David Kirkby wrote: >> Someone recently said he felt that a test:code ratio of 1:1 is about optimal, > > That of course is bunk. That was my feeling too. > The optimal

[sqlite] Corrupted database with duplicated primary keys

2010-11-11 Thread Israel Lins Albuquerque
Attached has a database corrupted. We use the version 3.6.23.1 in wince. the command: pragma integrity_check; show many errors and Duplicate pk was founded using: SELECT u_pkey, count(*) FROM tp_gpsdata GROUP BY u_pkey HAVING count(*) > 1 ; this returns only 1 record SELECT * FROM

[sqlite] new sqlite3_soft_heap_limit64 not available for extension libraries

2010-11-11 Thread Gerry Kleinpenning
Dear Sir / Madam, Maybe not a real/serious bug but… When I look at version 3.7.3 I see there is a new sqlite3_soft_heap_limit64, and that the old function sqlite3_soft_heap_limit is deprecated. Extension libraries get pointers to the API functions from the sqlite3_api_routines structure. A

Re: [sqlite] Strange WAL mode on 5GB+ database

2010-11-11 Thread Dan Kennedy
On Nov 11, 2010, at 3:47 AM, Alexey Pechnikov wrote: > $ ls -lh merch.db* > -rw-r--r-- 1 - - 5,8G Ноя 10 23:01 merch.db > -rw-r--r-- 1 - - 32K Ноя 10 23:04 merch.db-shm > -rw-r--r-- 1 - - 449M Ноя 10 23:01 merch.db-wal > > sqlite> pragma journal_mode; > wal > sqlite> pragma