Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-11 Thread Vander Clock Stephane
I know this trick, but it's a little longer to do than simply manually increate the file DB size ? my test show it's work, i m just currious why we can not do like this ? thanks again stéphane On 12/11/2010 3:44 AM, Max Vlasov wrote: > On Sat, Dec 11, 2010 at 1:52 AM, Vander Clock Stephane< >

Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-11 Thread Simon Slavin
On 11 Dec 2010, at 8:18am, Vander Clock Stephane wrote: > I know this trick, but it's a little longer to do than simply manually > increate the file DB size ? > my test show it's work, i m just currious why we can not do like this ? Fragmentation does not make much difference in any operating

Re: [sqlite] Select

2010-12-11 Thread lucavb
Works great! Thanks! Kees Nuyt wrote: > > On Fri, 10 Dec 2010 02:53:32 -0800 (PST), lucavb > wrote: > >> >>Hello, >>i need to to do this: >> >>i have this table: "userrates", composed by: id, userid, idtitle, rate. >> >>for example: >>(1, 12, 1, 3) >>(2, 15, 99, 4)

[sqlite] referential integrity, and necessity of a primary key on the one side

2010-12-11 Thread TP
Hello, I have a question about referential integrity when there is no explicitly defined primary key in the table on the one side. Look at this example: -- PRAGMA foreign_keys = ON; CREATE TABLE foo( bar ); INSERT INTO foo values( "bar1" ); CREATE TABLE fox( dog ,

Re: [sqlite] referential integrity, and necessity of a primary key on the one side

2010-12-11 Thread Kees Nuyt
On Sat, 11 Dec 2010 12:39:39 +0100, TP wrote: >Hello, > >I have a question about referential integrity when there is no explicitly >defined primary key in the table on the one side. Look at this example: > >-- >PRAGMA foreign_keys = ON; >

[sqlite] pragma vs select for introspection

2010-12-11 Thread BareFeetWare
On 11/12/2010, at 12:29 PM, Simon Slavin wrote: > The problem with foreign keys (and triggers !) as separate rows of > SQLITE_MASTER is that it would all have to be one long string, so you'd have > to write a parser. I'm not sure what you mean here. Triggers are already listed in

[sqlite] pragma vs select for introspection

2010-12-11 Thread BareFeetWare
On 11/12/2010, at 12:58 PM, Petite Abeille wrote: > On Dec 11, 2010, at 2:29 AM, Simon Slavin wrote: > >> Then all the other PRAGMAs that do this could be removed > > While a consistent, comprehensive API would be nice, the problem with pragmas > is that, even though they return what looks

Re: [sqlite] pragma vs select for introspection

2010-12-11 Thread Simon Slavin
On 11 Dec 2010, at 2:28pm, BareFeetWare wrote: > On 11/12/2010, at 12:58 PM, Petite Abeille wrote: > >> I'm in the opinion that a comprehensive data dictionary, accessible directly >> from SQL, is the way to go. > > Yes, yes, yes :-) > > I think there's an SQL standard for introspective

Re: [sqlite] pragma vs select for introspection

2010-12-11 Thread BareFeetWare
On 12/12/2010, at 1:48 AM, Simon Slavin wrote: > On 11 Dec 2010, at 2:28pm, BareFeetWare wrote: > >> I think there's an SQL standard for introspective queries, isn't there? Is >> it something like MySQL's "INFORMATION_SCHEMA Tables", as per?: >>

Re: [sqlite] referential integrity, and necessity of a primary key on the one side

2010-12-11 Thread TP
Kees Nuyt wrote: > It is by design. At the bottom of > http://www.sqlite.org/lang_createtable.html > it says: > The parent key of a foreign key constraint is not allowed to use the > rowid. The parent key must used named columns only. > > This means you have to alias the rowid to be able to

Re: [sqlite] pragma vs select for introspection

2010-12-11 Thread Petite Abeille
On Dec 11, 2010, at 3:48 PM, Simon Slavin wrote: > Section 21 of the (SQL92) standard. Yes, the notorious information schema: http://en.wikipedia.org/wiki/Information_schema > It's absolutely horrible. Des goûts et des couleurs on ne discute point. > Let's try to avoid that if we can.

Re: [sqlite] tarball and directory name

2010-12-11 Thread Mark Brand
On 12/08/2010 09:30 AM, Mark Brand wrote: > Hi, > > Just noticed that the format of the version in the tarball name changed, > as in "sqlite-autoconf-3070400.tar.gz". However, this unpacks to a > directory called "sqlite-3.7.4". This makes it difficult for automated > build systems that want to

[sqlite] SQLite crashes due to invalid pointer

2010-12-11 Thread Wanadoo Hartwig
Hi, take the following SQL statement: UPDATE tableA SET column1=(SELECT column2 FROM tableB WHERE function1(column3) < 1 ORDER BY function1(column3) LIMIT 1); Actually, this statement does not make sense because the ORDER BY expression does not fulfill the requirements of an ORDER BY

Re: [sqlite] pragma vs select for introspection

2010-12-11 Thread Darren Duncan
Petite Abeille wrote: > On Dec 11, 2010, at 3:48 PM, Simon Slavin wrote: > >> Section 21 of the (SQL92) standard. > > Yes, the notorious information schema: Nonsense. An information schema is a *good* thing, and is generally the *best* tool for introspecting a database. It lets you use all

Re: [sqlite] SQLite crashes due to invalid pointer

2010-12-11 Thread Richard Hipp
On Sat, Dec 11, 2010 at 7:07 PM, Wanadoo Hartwig < hartwig.wiesm...@wanadoo.nl> wrote: > Hi, > > take the following SQL statement: > > UPDATE tableA SET column1=(SELECT column2 FROM tableB WHERE > function1(column3) < 1 ORDER BY function1(column3) LIMIT 1); > > Actually, this statement does not