[sqlite] SQLite Introspection

2010-12-06 Thread Tom Krehbiel
I'm working with the Tcl interface to SQLite and am trying to do introspection on the schema. I've figured out how to do databases, tables, views, table columns, indexes, foreign keys, and the pragma settings but I'm having trouble with triggers and analyze. The documentation for the analyze comman

Re: [sqlite] Trigger and reference to temporary table - incomplete documentation?

2010-12-06 Thread Simon Slavin
On 6 Dec 2010, at 10:45pm, Oliver Peters wrote: > Am Montag, den 06.12.2010, 22:13 + schrieb Simon Slavin: >> On 6 Dec 2010, at 10:00pm, Oliver Peters wrote: >> In general, views, triggers, and foreign key constraints can only use objects within the same schema (=database). [snip]

Re: [sqlite] Accessing multiple rows at once via a select statement

2010-12-06 Thread Jonathan R. Haws
On 12/06/2010 04:09 PM, Igor Tandetnik wrote: > Jonathan Haws wrote: >> I am having some troubles figuring out how I can access multiple rows in a >> table.. >> >> For example, I have a table that I am trying to "SELECT * FROM some_table;". >> For each row in the table, my callback function is

Re: [sqlite] Accessing multiple rows at once via a select statement

2010-12-06 Thread Jonathan Haws
I had thought about that approach and it may be the way I go if the prepare/step functionality does not work for what I need. However, I only hesitate to do that because I would like to avoid copying the data again to prepare it for transmission to the requestor. Thanks for the insight. Jonath

Re: [sqlite] Accessing multiple rows at once via a select statement

2010-12-06 Thread Drake Wilson
Quoth Jonathan Haws , on 2010-12-06 22:51:16 +: > As an argument to the callback, I pass the address of the array. > However, I cannot change that address and have it persist through to > the next call for the next row. This isn't an SQLite problem; it's a C problem. You need to make a C-styl

Re: [sqlite] Accessing multiple rows at once via a select statement

2010-12-06 Thread Igor Tandetnik
Jonathan Haws wrote: > I am having some troubles figuring out how I can access multiple rows in a > table.. > > For example, I have a table that I am trying to "SELECT * FROM some_table;". > For each row in the table, my callback function is > called. I predict you'll find it much easier to

[sqlite] Accessing multiple rows at once via a select statement

2010-12-06 Thread Jonathan Haws
I am having some troubles figuring out how I can access multiple rows in a table.. For example, I have a table that I am trying to "SELECT * FROM some_table;". For each row in the table, my callback function is called. What I need to do is have the callback write the data in the rows into suc

Re: [sqlite] Trigger and reference to temporary table - incomplete documentation?

2010-12-06 Thread Oliver Peters
Am Montag, den 06.12.2010, 22:13 + schrieb Simon Slavin: > On 6 Dec 2010, at 10:00pm, Oliver Peters wrote: > > > [...] > > > >> The wording is not completely correct indeed. > >> In general, views, triggers, and foreign key constraints can only > >> use objects within the same schema (=databa

Re: [sqlite] Trigger and reference to temporary table - incomplete documentation?

2010-12-06 Thread Simon Slavin
On 6 Dec 2010, at 10:00pm, Oliver Peters wrote: > [...] > >> The wording is not completely correct indeed. >> In general, views, triggers, and foreign key constraints can only >> use objects within the same schema (=database). >> >> That makes sense, because SQLite (and you) cannot guarantee th

Re: [sqlite] Trigger and reference to temporary table - incomplete documentation?

2010-12-06 Thread Oliver Peters
[...] > The wording is not completely correct indeed. > In general, views, triggers, and foreign key constraints can only > use objects within the same schema (=database). > > That makes sense, because SQLite (and you) cannot guarantee the > other database file is attached when the view is used,

Re: [sqlite] append sql file

2010-12-06 Thread Teg
Hello CDN, Why don't you embed it as a blob? Make a table just for your text and feed it into the DB? Seems like a better idea than appending to a DB file that might just extend itself right over your text with the next insert. C Monday, December 6, 2010, 12:53:19 PM, you wrote: CM> Hi, CM> wa

Re: [sqlite] Possible bug: wrong query result when using an index

2010-12-06 Thread Gavrie Philipson
Richard Hipp writes: > > FYI: This is a real problem. We were just about to release SQLite version > 3.7.4 when Gavrie's email appeared. The 3.7.4 release will be delayed so > that we can fix this. The delay will probably be about a week. > > Bisecting shows that the problem has been in the

Re: [sqlite] append sql file

2010-12-06 Thread Igor Tandetnik
CDN Mark wrote: > thanks Igor, that works, but without the period at the end, as in */ Of course. The period is there to signal the end of the sentence, as is customary in English prose. It was not part of comment syntax. -- Igor Tandetnik ___ sqli

[sqlite] append sql file

2010-12-06 Thread CDN Mark
thanks Igor, that works, but without the period at the end, as in */ Mark ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Trigger and reference to temporary table - incomplete documentation?

2010-12-06 Thread Kees Nuyt
On Mon, 6 Dec 2010 18:51:25 + (UTC), Oliver Peters wrote: >Hello, > >I've tried to create this trigger: > >-- >CREATE TRIGGER log_DELETE_staff > AFTER DELETE ON staff FOR EACH ROW > BEGIN >

Re: [sqlite] SQLite Documentation

2010-12-06 Thread Scott A Mintz
Thanks. I saw that response after I had already replied. And it did work for me. -Scott sqlite-users-boun...@sqlite.org wrote on 12/06/2010 01:19:10 PM: > Scott A Mintz писал(а) в своём письме Tue, 07 > Dec 2010 00:03:35 +0600: > > > It doesn't seem to work in Win7. I get a table of conte

[sqlite] Trigger and reference to temporary table - incomplete documentation?

2010-12-06 Thread Oliver Peters
Hello, I've tried to create this trigger: -- CREATE TRIGGER log_DELETE_staff AFTER DELETE ON staff FOR EACH ROW BEGIN INSERT INTO xlog_staff(idOLD,id_staff_edito

Re: [sqlite] SQLite Documentation

2010-12-06 Thread Dagdamor
Scott A Mintz писал(а) в своём письме Tue, 07 Dec 2010 00:03:35 +0600: > It doesn't seem to work in Win7. I get a table of contents but the > content window is displaying an error. > > -Scott > > sqlite-users-boun...@sqlite.org wrote on 12/04/2010 03:51:04 AM: > >> Hello. >> >> Would you like

Re: [sqlite] append sql file

2010-12-06 Thread Igor Tandetnik
CDN Mark wrote: > was wondering if there was a way to have extra text on the end of an sql > file, after the COMMIT; ? > I'd like to combine two functions onto the one file, the text would be read > by another programme, but how can I tell SQLite to > ignore what's after the COMMIT I suppose y

Re: [sqlite] SQLite Documentation

2010-12-06 Thread Scott A Mintz
It doesn't seem to work in Win7. I get a table of contents but the content window is displaying an error. -Scott sqlite-users-boun...@sqlite.org wrote on 12/04/2010 03:51:04 AM: > Hello. > > Would you like to have a downloadable version of the SQLite Documentation? > I've created one in Wind

[sqlite] FTS3: custom tokenizer filter over built-in tokenizer

2010-12-06 Thread Iker Arizmendi
Hello all, I'd like to create an FTS3 tokenizer that filters stop words by internally creating the simple or porter tokenizers and filtering its output as needed (ala Lucene's StandardAnalyzer). Eg, CREATE VIRTUAL TABLE test USING fts3(txt, tokenize=stopword simple w1 ... wN) However, th

[sqlite] FTS3: custom tokenizer filter over built-in tokenizer (resend)

2010-12-06 Thread Iker Arizmendi
Hello all, I'd like to create an FTS3 tokenizer that filters stop words by internally creating the simple or porter tokenizers and filtering its output as needed (ala Lucene's StandardAnalyzer). Eg, CREATE VIRTUAL TABLE test USING fts3(txt, tokenize=stopword simple w1 ... wN) However, th

[sqlite] append sql file

2010-12-06 Thread CDN Mark
Hi, was wondering if there was a way to have extra text on the end of an sql file, after the COMMIT; ? I'd like to combine two functions onto the one file, the text would be read by another programme, but how can I tell SQLite to ignore what's after the COMMIT mtia Mark

Re: [sqlite] setting autoincrement value on table with two primarykeys

2010-12-06 Thread Kees Nuyt
On Sun, 5 Dec 2010 19:08:59 -0500, "Igor Tandetnik" wrote: >Kees Nuyt wrote: >> If you need a compound index for performance reasons, you can use >> the autoincrement key as the primary key for the table and define a >> unique index on the compound key. > > I can't think of any statement that wo

[sqlite] What the concequence to use a page size of 512 bytes on a hard drive with a cluster size of 64kb ?

2010-12-06 Thread Vander Clock Stephane
Hello, what are the concequence to use a page size of 512 bytes on a hard drive with a cluster size of 64kb ? thanks by advance stéphane ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Optimizers :memory: mode

2010-12-06 Thread Schoinya
Hello everybody I'd like to know if there are differences between the optimizers in the sqlite in-memory DB and on disk DB. I mean, whether there are different optimizers which are applied as default, that can make difference between IMDB and on disk DB, in terms of query execution time. Also, f

Re: [sqlite] SQLite 3 and FK

2010-12-06 Thread Jay A. Kreibich
On Mon, Dec 06, 2010 at 06:20:13PM +0600, Dagdamor scratched on the wall: > Wodka40[Google] писал(а) в своём письме Mon, 06 > Dec 2010 17:30:47 +0600: > > > (First of all sorry for my "inglish") > > > > 3 tables : > > Owners > > Models > > Cars > > > > My difficult is recreate a kind of "refere

Re: [sqlite] Possible bug: wrong query result when using an index

2010-12-06 Thread Richard Hipp
FYI: This is a real problem. We were just about to release SQLite version 3.7.4 when Gavrie's email appeared. The 3.7.4 release will be delayed so that we can fix this. The delay will probably be about a week. Bisecting shows that the problem has been in the code since at least 2009-08-13. Bu

Re: [sqlite] Possible bug: wrong query result when using an index

2010-12-06 Thread Gavrie Philipson
Gerry Snyder writes: ... > The changes were to use the real column names and not the aliases from the > SELECT clause. > > I believe the problem arises (and the book "Using SQLite" explains it a lot > better than I can) because the FROM and WHERE clauses are executed before > the SELECT clause.

Re: [sqlite] SQLite 3 and FK

2010-12-06 Thread Dagdamor
Wodka40[Google] писал(а) в своём письме Mon, 06 Dec 2010 17:30:47 +0600: > (First of all sorry for my "inglish") > > 3 tables : > Owners > Models > Cars > > My difficult is recreate a kind of "referential integrity" through FK > > With 2 tables not problem but with 3 cascade table . > > Ow

[sqlite] SQLite 3 and FK

2010-12-06 Thread Wodka40[Google]
(First of all sorry for my "inglish") 3 tables : Owners Models Cars My difficult is recreate a kind of "referential integrity" through FK With 2 tables not problem but with 3 cascade table . Owner: PK IDowner Models: PK IDmodel Cars: CodOwner CodModel IDowner 1-> many CodOwner IDmodel 1