Re: [sqlite] BETWEEN and explicit collation assignment

2013-08-27 Thread Nico Williams
On Mon, Aug 26, 2013 at 2:03 PM, Roman Fleysher wrote: Certainly associating a type conversion with a lexical instance of an operator, applying to all of the operator's operands (or perhaps even just to some, while having to explicitly cast others) would work, at least for operations which can on

Re: [sqlite] Update field from standard input with sqlite3 command line utility

2013-08-27 Thread James K. Lowden
On Mon, 26 Aug 2013 20:01:08 +0200 Clemens Ladisch wrote: > sqlite3 database.db "UPDATE table1 SET column3 = CAST(x'$(hexdump -v > -e '1/1 "%02x"' file.xml)' AS TEXT) WHERE column1 = 'some name';" $ hexdump -C input 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f | !"#$%&'()*+,-./| 0

Re: [sqlite] BETWEEN and explicit collation assignment

2013-08-27 Thread James K. Lowden
On Mon, 26 Aug 2013 19:03:39 + Roman Fleysher wrote: > However, sometimes, in comparison we want to ignore some of the > attributes, or compare derived ones. Many busses can carry 25 people, > and may be considered equal if we simply need to transport people. > Busses certainly differ by othe

Re: [sqlite] SQLite, .Net and Datareader: Close method is too slow.

2013-08-27 Thread Larry Brasfield
*Mário Cardia wrote:* > Solved: > > The Method Close of the Datareader was slow because it was inside a > try-catch. > I remove de try-catch and it´s ok now. The SQLiteDataReader class, properly implementing the IDataReader interface, exposes and relies upon proper use of the IDispose interface.

Re: [sqlite] SQLite, .Net and Datareader: Close method is too slow.

2013-08-27 Thread Mário Cardia
Solved: The Method Close of the Datareader was slow because it was inside a try-catch. I remove de try-catch and it´s ok now. []'s Mário Cardia 2013/8/27 Mário Cardia > > Hi, > > I'm have a batch proccess that reads from many datareaders. > > When I finished with de datareader I call the cl

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
Big thanks, Igor. BTW, ICU surprised me. -- View this message in context: http://sqlite.1065341.n5.nabble.com/Collation-advice-tp70668p70720.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlit

Re: [sqlite] 3.8.0 breaks pkgconfig file

2013-08-27 Thread Dan Kennedy
On 08/27/2013 09:30 PM, Andreas Radke wrote: A common build in Arch Linux doesn't properly replace Version: @RELEASE@ in file sqlite3.pc. Thanks for reporting this. A new package that should fix this problem is up now. Dan. ___ sqlite-users mailin

Re: [sqlite] 3.8.0 Update

2013-08-27 Thread James Pearson
On 27 Aug 2013, at 9:43, Dan Kennedy wrote: On 08/27/2013 09:33 PM, James Pearson wrote: On 27 Aug 2013, at 8:19, Richard Hipp wrote: On Tue, Aug 27, 2013 at 10:15 AM, James Pearson wrote: I've just updated to SQLite 3.8.0 and seem to have lost the ability to use the up arrow key to cycl

Re: [sqlite] 3.8.0 Update

2013-08-27 Thread Dan Kennedy
On 08/27/2013 09:33 PM, James Pearson wrote: On 27 Aug 2013, at 8:19, Richard Hipp wrote: On Tue, Aug 27, 2013 at 10:15 AM, James Pearson wrote: I've just updated to SQLite 3.8.0 and seem to have lost the ability to use the up arrow key to cycle through my command line history. Which OS?

Re: [sqlite] 3.8.0 Update

2013-08-27 Thread James Pearson
On 27 Aug 2013, at 8:19, Richard Hipp wrote: > On Tue, Aug 27, 2013 at 10:15 AM, James Pearson wrote: > >> I've just updated to SQLite 3.8.0 and seem to have lost the ability to use >> the up arrow key to cycle through my command line history. >> > > Which OS? > > -- > D. Richard Hipp > d...@sqli

[sqlite] 3.8.0 breaks pkgconfig file

2013-08-27 Thread Andreas Radke
A common build in Arch Linux doesn't properly replace Version: @RELEASE@ in file sqlite3.pc. -Andy ArchLinux ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] 3.8.0 Update

2013-08-27 Thread Richard Hipp
On Tue, Aug 27, 2013 at 10:15 AM, James Pearson wrote: > I've just updated to SQLite 3.8.0 and seem to have lost the ability to use > the up arrow key to cycle through my command line history. > Which OS? -- D. Richard Hipp d...@sqlite.org ___ sqlite

[sqlite] 3.8.0 Update

2013-08-27 Thread James Pearson
I've just updated to SQLite 3.8.0 and seem to have lost the ability to use the up arrow key to cycle through my command line history. I was a few versions behind so that functionality may have been removed in a previous release. Is there a way to get command recall back? Thanks, James __

Re: [sqlite] Collation advice

2013-08-27 Thread Igor Tandetnik
On 8/27/2013 6:50 AM, Jan Slodicka wrote: That's not all that unusual: even in English, you might want to sort Muenster and Münster next to each other. Thanks, Igor. Do you know more? Do you consider ascii comparison too dangerous? At one point, we did in our project the same thing you are

Re: [sqlite] Collation advice

2013-08-27 Thread Igor Tandetnik
On 8/27/2013 9:08 AM, Igor Tandetnik wrote: On 8/27/2013 6:37 AM, Jan Slodicka wrote: Besides this I am aware of only 1 problem - Swedish should treat v/w identically. Not anymore. There was a reform in 2006, and V and W now sort separately. ... but in Finnish, they are still sorted together

Re: [sqlite] Collation advice

2013-08-27 Thread Simon Slavin
On 27 Aug 2013, at 2:08pm, Igor Tandetnik wrote: > On 8/27/2013 6:37 AM, Jan Slodicka wrote: >> Besides this I am aware of only 1 problem - Swedish should treat v/w >> identically. > > Not anymore. There was a reform in 2006, and V and W now sort separately. A great illustration of why a non-

Re: [sqlite] Collation advice

2013-08-27 Thread Igor Tandetnik
On 8/27/2013 6:37 AM, Jan Slodicka wrote: Besides this I am aware of only 1 problem - Swedish should treat v/w identically. Not anymore. There was a reform in 2006, and V and W now sort separately. -- Igor Tandetnik ___ sqlite-users mailing list sql

Re: [sqlite] CREATE INDEX and column order

2013-08-27 Thread Simon Slavin
On 27 Aug 2013, at 1:07pm, Doug Nebeker wrote: > I was reading about the new query planner and came across a few references to > that idea that the left most columns in the index definition should be the > most unique (as far as values in the column are concerned). > > Is that correct? In my

[sqlite] SQLite, .Net and Datareader: Close method is too slow.

2013-08-27 Thread Mário Cardia
Hi, I'm have a batch proccess that reads from many datareaders. When I finished with de datareader I call the close() method. This is too slow. If I don´t close the data reader, the application runs in 0.4ms If I close the datareader, the application runs in 26 seconds. Does anybody has a tip i

[sqlite] CREATE INDEX and column order

2013-08-27 Thread Doug Nebeker
I was reading about the new query planner and came across a few references to that idea that the left most columns in the index definition should be the most unique (as far as values in the column are concerned). Is that correct? In my case, many tables have a timestamp column, and I've been u

[sqlite] SQLite + .Net + DataReader: Close Method is too slow.

2013-08-27 Thread Mário Cardia
Hi, I'm have a batch proccess that reads from many datareaders. When I finished with de datareader I call the close() method. This is too slow. If I don´t close the data reader, the application runs in 0.4ms If I close the datareader, the application runs in 26 seconds. Does anybody has a tip i

[sqlite] Documentation improvement request

2013-08-27 Thread Simon Slavin
I think it would be useful if mentioned that there was a PRAGMA that did the same thing: This would help people who aren't calling the SQLite API directly but are working with a more restric

Re: [sqlite] Database locking Error

2013-08-27 Thread Simon Slavin
On 27 Aug 2013, at 5:15am, techi eth wrote: > For read operation i am doing _prepare(), _step(), _finalize(). > For all other operation i am doing _exec(). > > Do you see any issue ? Nothing obvious from what I already know apart from the fact that you don't mention setting a timeout:

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
> btw. Muenster / Münster would fall back to full comparison due to the ü Yes, but what could fail then is for example Muenster / Muster. In case OS sorts ue/ü between uz and v - ascii and OS comparisons would yield different results. -- View this message in context: http://sqlite.1065341.n

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
> That's not all that unusual: even in English, you might want to sort > Muenster and Münster next to each other. Thanks, Igor. Do you know more? Do you consider ascii comparison too dangerous? Jan -- View this message in context: http://sqlite.1065341.n5.nabble.com/Collation-advice-tp70668

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
Hi Dan > Sounds like an accident waiting to happen though. A developer could update a file using the sqlite shell. I forgot to mention that our DB uses custom enryption. Hence nobody can manipulate anything outside the application. The only exception is our custom-built sqlite shell, which is us

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
Hi Simon > Given the declared setup we have two concerns: > 1) dependent on system locale which can be changed As I already mentioned in one of previous posts: If it proves to be a problem, we can remember used locale and force index rebuild if necessary. (Android version behaves this way alread

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
> Unit Tests: > I would isolate the comparison in a core function, and primarily test that > core function Main application is written i C#. Sqlite and extensions are in dll, hence the main code cannot directly access the collation function. While we have low-level tests that are occasionally r

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
P.S. Based on your doubts (this iOS code wasn't written by me, I normally work on other platforms), I decided to do some googling. And well, this article demostrates incompatibility between ascii and CFStringCompare. Per

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
> Anyway, I would definitely unicode-normalize the strings before putting them into the database. You might avoid the special handling for the digraphs if you normalize towards the digraph code points: only strings actually containing digraphs would escape your optimization. Tough stuff. Althoug

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
> If you build a database using NOCASE version 1, then try to use the database with a different NOCASE version X where X>1, the database will appear to be corrupt, since the order of the indices will be incorrect. Thanks, the danger is clear. Regards, Jan Slodicka -- View this message in

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
> There's a problem here when comparing empty strings, that is, when nKey1 == nKey2 == 0. Good point. Must have been blind when I wrote this. > Why are you comparing elements at index 0 explicitly? memcmp() should do > the right thing. Yes, but it is faster this way. Regards, Jan Slodic

Re: [sqlite] Collation advice

2013-08-27 Thread Jan Slodicka
> Furthermore, the collation depends on the system locale. I am aware of that risk, but take it as acceptable. Should it present a problem in the future (highly doubtful), we can store used locale and rebuild indexes in case the system locale changes. Regards, Jan Slodicka -- View this mes