[sqlite] FTS3 IGNORE OR REPLACE????

2009-11-03 Thread sorka
Is there any way to have an intsert into an FTS3 table ignore a row if the ROWID being inserted already exists? This is turning out to be quite troublesome because I'm inserting thousands of records where just a few like 3 or 4 will have the same rowid as existing records. However, to do the test

Re: [sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread David Bicking
You could try to prepare a statement like "SELECT YourColumnName FROM YourTable;" If prepare returns an error, then likely the error message will say the column doesn't exist. If no error, it does exist. Such a simple query shouldn't take long to prepare. Probably less time then to grab the resu

Re: [sqlite] Getting older version from website

2009-11-03 Thread D. Richard Hipp
On Nov 3, 2009, at 8:03 PM, Edward Diener wrote: > D. Richard Hipp wrote: >> On Nov 3, 2009, at 9:34 AM, Edward Diener wrote: >> >>> Is it possible to retrieve an older version of sqlite from the web >>> site >>> rather than the latest version ? >> >> >> http://www.sqlite.org/download.html#cvs >

Re: [sqlite] Table within a table??

2009-11-03 Thread John Crenshaw
> Jay A. Kreibich wrote: >> On Tue, Nov 03, 2009 at 02:51:23AM -0800, CityDev scratched on the wall: >>> That just seems so contrary to the original idea of the relational >>> model that you shouldn't have any data whose meaning is not defined >>> by data (in the case of an array you need to under

Re: [sqlite] Getting older version from website

2009-11-03 Thread Edward Diener
D. Richard Hipp wrote: > On Nov 3, 2009, at 9:34 AM, Edward Diener wrote: > >> Is it possible to retrieve an older version of sqlite from the web >> site >> rather than the latest version ? > > > http://www.sqlite.org/download.html#cvs I have no idea how to find a release from that page. I go

Re: [sqlite] Getting older version from website

2009-11-03 Thread D. Richard Hipp
On Nov 3, 2009, at 9:34 AM, Edward Diener wrote: > Is it possible to retrieve an older version of sqlite from the web > site > rather than the latest version ? http://www.sqlite.org/download.html#cvs D. Richard Hipp d...@hwaci.com ___ sqlite-use

Re: [sqlite] User-defined infix functions

2009-11-03 Thread John Crenshaw
In your specific example you could simply define a custom "LIKE" function, and LIKE could become Unicode aware without any goofy new operators. John -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jean-Christophe Deschamps Sen

Re: [sqlite] Table within a table??

2009-11-03 Thread Darren Duncan
Jay A. Kreibich wrote: > On Tue, Nov 03, 2009 at 02:51:23AM -0800, CityDev scratched on the wall: >> That just seems so contrary to the original idea of the relational >> model that you shouldn't have any data whose meaning is not defined >> by data (in the case of an array you need to understand t

[sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread Shaun Seckman (Firaxis)
Hello all, I just wanted to find out whether or not this is the most ideal method for determining if a column exists in a table. My current technique is to do execute "pragma table_info(tableName)" then step through the results and perform a string comparison against the "name" co

[sqlite] triggers revisited

2009-11-03 Thread Victor Mayevski
Ok, I will rephrase my question although it appears that the answer is has been already preconceived. I am writing an abstraction layer to Sqlite where tables, views, triggers etc are presented as XOTcl Classes/Objects. If two different scripts access the database and one of them creates a new tabl

Re: [sqlite] index optimal?

2009-11-03 Thread Sylvain Pointeau
Hi, many thanks for your answer, I just think that it could be useful to know if an index is optimal or not, kind of a tool that could give you the best index for speed up a query. Many thanks, Sylvain On Tue, Nov 3, 2009 at 2:52 PM, Griggs, Donald wrote: > Hi Sylvain, > > > Regarding: can yo

Re: [sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread Adam DeVita
Another way SELECT name, sql FROM sqlite_master WHERE type='table' and name ='yourtable name' the field sql will give you the full table structure as a string. Parse for your desired table name. No statements fail. On Tue, Nov 3, 2009 at 4:37 PM, Igor Tandetnik wrote: > Shaun Seckman (Fir

Re: [sqlite] triggers revisited

2009-11-03 Thread P Kishor
On Tue, Nov 3, 2009 at 1:23 PM, Victor Mayevski wrote: > Ok, I will rephrase my question although it appears that the answer is > has been already preconceived. I am writing an abstraction layer to > Sqlite where tables, views, triggers etc are presented as XOTcl > Classes/Objects. If two differen

Re: [sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread Igor Tandetnik
Shaun Seckman (Firaxis) wrote: >I just wanted to find out whether or not this is the > most ideal method for determining if a column exists in a table. My > current technique is to do execute "pragma table_info(tableName)" then > step through the results and perform a string comp

Re: [sqlite] triggers revisited

2009-11-03 Thread Simon Slavin
On 3 Nov 2009, at 7:23pm, Victor Mayevski wrote: > Ok, I will rephrase my question although it appears that the answer is > has been already preconceived. I am writing an abstraction layer to > Sqlite where tables, views, triggers etc are presented as XOTcl > Classes/Objects. If two different scr

Re: [sqlite] Windows 7?

2009-11-03 Thread Sam Carleton
Nope, I have one binary for Window XP, Vista, and Windows 7. I only test the 32-bit code on 64-bit Vista and Win 7 and all runs just fine! On Tue, Nov 3, 2009 at 1:06 PM, Adam DeVita wrote: > Good day, > > Will a new DLL be required for Windows 7 ? > ___

[sqlite] User-defined infix functions

2009-11-03 Thread Jean-Christophe Deschamps
Is it currently possible to specify that a user-defined function is of type infix, using the extension framework? It would be really easier to use, say a Unicode-aware LIKE named LIKEU under the infix form: ... test LIKEU pattern ... than ... LIKEU(pattern, test

Re: [sqlite] Table within a table??

2009-11-03 Thread Jay A. Kreibich
On Tue, Nov 03, 2009 at 02:51:23AM -0800, CityDev scratched on the wall: > > Whilst it's true that SQL isn't essential for a relational database More to the point, any database that supports SQL does not, and cannot, support the data typing and data manipulation rules set out by the Relatio

[sqlite] Getting older version from website

2009-11-03 Thread Edward Diener
Is it possible to retrieve an older version of sqlite from the web site rather than the latest version ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Windows 7?

2009-11-03 Thread Adam DeVita
Good day, Will a new DLL be required for Windows 7 ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] User-defined infix functions

2009-11-03 Thread Jean-Christophe Deschamps
´¯¯¯ >In your specific example you could simply define a custom "LIKE" >function, and LIKE could become Unicode aware without any goofy new >operators. `--- Yes of course, but I'm doing so to keep the possibility to use the native operator as well.

Re: [sqlite] index optimal?

2009-11-03 Thread Simon Slavin
On 3 Nov 2009, at 7:33pm, Sylvain Pointeau wrote: > I just think that it could be useful to know if an index is optimal > or not, > kind of a tool that could give you the best index for speed up a > query. Your brain. A simplified explanation on how to decide what indices you need follows

Re: [sqlite] triggers revisited

2009-11-03 Thread Igor Tandetnik
Victor Mayevski wrote: > Ok, I will rephrase my question although it appears that the answer is > has been already preconceived. I am writing an abstraction layer to > Sqlite where tables, views, triggers etc are presented as XOTcl > Classes/Objects. If two different scripts access the database an

Re: [sqlite] What sort of programming errors would cause these strange results?

2009-11-03 Thread Beau Wilkinson
>Is it possible that the library is sorting the CUSTOMER.id list >alphabetically not numerically, and jumping into the sorted PK list at >the correct offset but finding the wrong value in that location as a >result of the improper sort? That seems plausible. But speaking as a programmer, I do not

Re: [sqlite] Table within a table??

2009-11-03 Thread P Kishor
On Tue, Nov 3, 2009 at 4:51 AM, CityDev wrote: > I'm interested in your remark that relational databases now cope with > 'arrays'. Personally I've never seen that in DB2, Jet or SQLite. That just > seems so contrary to the original idea of the relational model that you > shouldn't have any data wh

Re: [sqlite] index optimal?

2009-11-03 Thread Griggs, Donald
Hi Sylvain, Regarding: can you describe an output of a "explain"? ==> A very short answer could be that, in the output of EXPLAIN QUERY PLAN "If you see the name of an index, then that index is used." Regarding: is there something to tell us the best index to have for a specified

Re: [sqlite] Question regarding modified ATTACH command

2009-11-03 Thread WClark
Sorry, the attachment got scrubbed I think. Here it is again: diff -U 3 -H -d -r -N -- sqlite-3.6.17/src/attach.c sqlite-3.6.17-mod/src/attach.c --- sqlite-3.6.17/src/attach.c 2009-11-03 10:47:25.0 +0100 +++ sqlite-3.6.17-mod/src/attach.c 2009-11-03 10:47:25.0 +0100 @@ -5

[sqlite] Question regarding modified ATTACH command

2009-11-03 Thread WClark
Hello, I have a question regarding a modification I've made to the ATTACH DATABASE command in Sqlite. The attached diff file (set against version 3.6.17) shows the modifications I've made, which I hope can be read quite simply. The modification involves adding an optional "READONLY" keyword;

[sqlite] What sort of programming errors would cause these strange results?

2009-11-03 Thread Tim Romano
I have a SQLite database working quite nicely. The three main tables have 4 million rows and 275,000 rows respectively, and query response times are excellent: I have used several GUI front ends to query the data, and they jibe with each other, both with regard to the (accurate) results they re

Re: [sqlite] index optimal?

2009-11-03 Thread Sylvain Pointeau
hello, can you describe an output of a "explain"? for me it is hard to read and to analyze the output. is there something to tell us the best index to have for a specified query? best regards, Sylvain On Tue, Nov 3, 2009 at 10:40 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- >

Re: [sqlite] Table within a table??

2009-11-03 Thread CityDev
Whilst it's true that SQL isn't essential for a relational database, it's a fairly useful simplification to say a relational database is a thing that responds correctly to SQL and doesn't allow other accesses (ie no subversion). I'm interested in your remark that relational databases now cope wit

Re: [sqlite] index optimal?

2009-11-03 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sylvain Pointeau wrote: > how do we know that we are using an optimal index in a query? How do you know if you are not? The point of an index is to avoid visiting every row in a table while evaluating an expression, so generally the best index is one

[sqlite] index optimal?

2009-11-03 Thread Sylvain Pointeau
hello, how do we know that we are using an optimal index in a query? Best regards, Sylvain ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users