Re: [sqlite] Re ferential Integrity

2010-08-18 Thread Igor Tandetnik
gher wrote: > Hello everybody, does support "referential integrity" SQLITE database..? Yes it does. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] BINARY type

2010-08-18 Thread Benjamin Peterson
Hi, I was curious if there's a reason why BINARY as a column type doesn't produce a column without a type affinity like BLOB. This would be one less special case between SQLite and other RDMS. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Re ferential Integrity

2010-08-18 Thread gher
Hello everybody, does support "referential integrity" SQLITE database..? Gher -- View this message in context: http://old.nabble.com/Referential-Integrity-tp29477414p29477414.html Sent from the SQLite mailing list archive at Nabble.com. ___

Re: [sqlite] How to execute '.read ...' along with some other commands from command-line?

2010-08-18 Thread Simon Davies
On 18 August 2010 22:45, Peng Yu wrote: > Hi, > > I'm trying to use '.read ...' along with other commands from > command-line. But it was not successful. Could anybody let me know > what is the correct way to do so? > > $ cat main.sql > select 4; > $ cat main.sh >

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-18 Thread Scott Hess
I'm not sure Chromium has any fts1 databases, I think the original patch was applied there for completeness. The change from fts2 to fts3 has been made in the history system, but it only applies to new data, and hasn't yet rolled out to stable. So we wouldn't be able to even start to cease using

[sqlite] How to execute '.read ...' along with some other commands from command-line?

2010-08-18 Thread Peng Yu
Hi, I'm trying to use '.read ...' along with other commands from command-line. But it was not successful. Could anybody let me know what is the correct way to do so? $ cat main.sql select 4; $ cat main.sh #!/usr/bin/env bash sqlite3 main.db3 'select 3; select 4;' sqlite3 main.db3 '.read

Re: [sqlite] Question concerning foreign keys across databases

2010-08-18 Thread Pavel Ivanov
> In either case the insertion would > fail, since it can only be checked when it happens and it probably will > not be checked again afterwards. This is exactly the reason why it's not logical action: SQLite will check constraint only in those places where it knows that something is changed and

Re: [sqlite] Question concerning foreign keys across databases

2010-08-18 Thread Oliver Schneider
Hello Pavel, thanks for your reply. On 2010-08-18 20:39, Pavel Ivanov wrote: >> Summary: how can I use foreign keys across database boundaries? Is it at >> all possible? > > No. It's logically incorrect action, so it's impossible. If you want > consistency of your tables to be automatically

Re: [sqlite] Question concerning foreign keys across databases

2010-08-18 Thread Stephan Wehner
On Wed, Aug 18, 2010 at 1:39 PM, Pavel Ivanov wrote: >> Summary: how can I use foreign keys across database boundaries? Is it at >> all possible? > > No. It's logically incorrect action, so it's impossible. If you want > consistency of your tables to be automatically checked

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-18 Thread Richard Hipp
I'm thinking that you shouldn't be using FTS1 and FTS2 in the first place. They are untested and unsupported. We'll get around to patching them, if you insist, but right now we are busy trying to 3.7.1 out the door. On Wed, Aug 18, 2010 at 4:41 PM, Paweł Hajdan, Jr.

Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-18 Thread Paweł Hajdan , Jr .
On Tue, Aug 10, 2010 at 13:16, Paweł Hajdan, Jr. wrote: > Now, how about fts1 and fts2? The original chromium patch is at > http://codereview.chromium.org/174387 . Could you take a look and suggest > a way to upstream those fixes to SQLite? > Ping about the above. Or

Re: [sqlite] Question concerning foreign keys across databases

2010-08-18 Thread Pavel Ivanov
> Summary: how can I use foreign keys across database boundaries? Is it at > all possible? No. It's logically incorrect action, so it's impossible. If you want consistency of your tables to be automatically checked by database engine you need to allow that engine to see those tables at all times.

[sqlite] Question concerning foreign keys across databases

2010-08-18 Thread Oliver Schneider
Hello, when trying to use foreign keys I'm running into a problem. It could be that I hit some general limitation, but then again the error that I'm seeing could also be issued if the database with the table of the referenced foreign key is not attached. Here's what I'm trying to do. I have

Re: [sqlite] Bug in FTS3 when trying to rename table within a transaction

2010-08-18 Thread Dan Kennedy
On Aug 19, 2010, at 1:21 AM, Nasron Cheong wrote: > I'm getting a db error when trying to alter an fts table within a > transaction. > > This only happens if the statement before the alter is an insert. Thanks for the report. This won't get fixed until after 3.7.1 though. For now, fts3 tables

[sqlite] Bug in FTS3 when trying to rename table within a transaction

2010-08-18 Thread Nasron Cheong
I'm getting a db error when trying to alter an fts table within a transaction. This only happens if the statement before the alter is an insert. See below: D:\temp>sqlite3 tmp.db SQLite version 3.6.23.1 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create

Re: [sqlite] Why the deadlock?

2010-08-18 Thread Nikolaus Rath
Nikolaus Rath writes: > Dan Kennedy writes: >> On Aug 17, 2010, at 1:48 AM, Nikolaus Rath wrote: >> >>> Hello, >>> >>> The script below fails with >>> >>> Deadlock detected when executing 'DELETE FROM foo

Re: [sqlite] multiple conections for the same database

2010-08-18 Thread Pavel Ivanov
> #1 WAL COMMIT will not corrupt current reading thread (even if deletes occur, > changes/adds are not visible either). > #2 Next SELECT transaction will pick up the new data. > Correct? Yes that's correct. > Dangerous thing would be two threads writing if either one is using a currect >

Re: [sqlite] multiple conections for the same database

2010-08-18 Thread Black, Michael (IS)
Soto clarify...this is a completely safe operation in 3.7.0.1.??? #1 WAL COMMIT will not corrupt current reading thread (even if deletes occur, changes/adds are not visible either). #2 Next SELECT transaction will pick up the new data. Correct? Dangerous thing would be two threads writing

Re: [sqlite] multiple conections for the same database

2010-08-18 Thread Pavel Ivanov
> Which means the read works on old data until you COMMIT? > Is that true?  So that COMMIT will allow you to query the changed/new data > from the other thread? AFAIK, no. Of course until you COMMIT no reader will see your data. But after you commit all already started reading transactions won't

Re: [sqlite] multiple conections for the same database

2010-08-18 Thread Black, Michael (IS)
Which means the read works on old data until you COMMIT? Is that true? So that COMMIT will allow you to query the changed/new data from the other thread? Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems

Re: [sqlite] multiple conections for the same database

2010-08-18 Thread Pavel Ivanov
> SQLite allows multiple readers, or exactly one wrier, accessing the database > at the same time. You can't read and write simultaneously, you must arrange > for your connections to take turns. SQLITE_BUSY error is a signal for you to > back off, wait a little, then try again. See also >

Re: [sqlite] Sizeof tables

2010-08-18 Thread Max Vlasov
On Tue, Aug 17, 2010 at 4:28 PM, Lukas Haase wrote: > Hi, > > My sqlite database is about 65 MB. The data is split into serval tables. > > Is there a way to enumerate the space requirements for each table so > that I can see which tables are the memory consumers? > > Look at

Re: [sqlite] Forthcoming release of SQLite 3.7.1

2010-08-18 Thread Jim Wilcoxson
SQLite is a great product; I use SEE, the encrypted edition. For those of us who are not using the C interface, I'd like to request that when possible, new C features like hinting about file sizes and extents also be added as pragmas. Pragmas make it very easy for non-C interfaces to make use of

Re: [sqlite] fast string prefix matching

2010-08-18 Thread Igor Tandetnik
Doug Reeder wrote: > Does SQLite treat strings as sequences of opaque 16-bit values, except > for the wildcard operators for LIKE and GLOB? Does it care about > surrogate code points? Does it care about FDD0 to FDEF ? SQLite knows something about surrogate pairs - this

[sqlite] Forthcoming release of SQLite 3.7.1

2010-08-18 Thread Richard Hipp
We are striving to release SQLite version 3.7.1 within the next few days. If you have any feedback, objections, comments, or concerns about this release, please respond as soon as possible to this mailing list, or via private email to me. A summary of the changes in 3.7.1 can be found here:

Re: [sqlite] getting table notifications

2010-08-18 Thread Igor Tandetnik
Mark Chekhanovskiy (mchekhan) wrote: > I had been experimenting with TEMP triggers and > sqlite3_create_function() to get the notification about the table > changes. It seems to work on the same db connection within one thread. > Anyone tried doing similar stuff for two+

[sqlite] Sizeof tables

2010-08-18 Thread Lukas Haase
Hi, My sqlite database is about 65 MB. The data is split into serval tables. Is there a way to enumerate the space requirements for each table so that I can see which tables are the memory consumers? Regards, Luke ___ sqlite-users mailing list

[sqlite] multiple conections for the same database

2010-08-18 Thread andres felipe tamayo cortes
HI, i have a doubt: i have one application who reads a database, it run well without problems, but when i tried to load this dabase from other program (while its still running the first application), appearsme database blocked, isnt it possible to load one database from more than one programm

Re: [sqlite] fast string prefix matching

2010-08-18 Thread Simon Slavin
On 18 Aug 2010, at 7:26am, Doug Reeder wrote: > Does SQLite treat strings as sequences of opaque 16-bit values, except > for the wildcard operators for LIKE and GLOB? Does it care about > surrogate code points? Does it care about FDD0 to FDEF ? The first: opaque. It doesn't understand

[sqlite] getting table notifications

2010-08-18 Thread Mark Chekhanovskiy (mchekhan)
Hi I had been experimenting with TEMP triggers and sqlite3_create_function() to get the notification about the table changes. It seems to work on the same db connection within one thread. Anyone tried doing similar stuff for two+ processes connecting to the same db instance? My ultimate

Re: [sqlite] fast string prefix matching

2010-08-18 Thread Doug Reeder
On Aug 17, 2010, at 9:28 PM, Igor Tandetnik wrote: > Doug Reeder wrote: >> I need to search for string prefix matches; for example given the >> path 'PP', >> I need to find 'PPA', 'PPBJQ', and 'PPz'. (The character set is all >> characters greater than or equal to 'A',