Re: [sqlite] Parsing create statements

2010-01-21 Thread BareFeet
Hi Richard, Thanks for your reply: > SQLite doesn't really do a parse tree so much. It does a little. Sometimes. > But its style of operation is closer to "syntax directed translation", > especially for the CREATE TABLE statement. So is there any way to extract a meaningful breakup of a

Re: [sqlite] Parsing create statements

2010-01-21 Thread BareFeet
Hi Roger, > BareFeet wrote: >> At the moment I am resorting to developing regular expressions to do the >> parsing. They work, but it seems to be re-inventing the wheel. > > You won't be able to do parsing completely with regular expressions. Create > statements let you specify default values

Re: [sqlite] Parsing create statements

2010-01-21 Thread D. Richard Hipp
On Jan 21, 2010, at 5:36 PM, BareFeet wrote: > > Vivien wrote: >> You can use SQLite's own SQL parser >> (http://www.hwaci.com/sw/lemon/lemon.html) with SQLite's own grammar >> (to ba found in SQLite's sources) and adapt it to you needs. > > That's the theory, but how can I do that easily? It

Re: [sqlite] Parsing create statements

2010-01-21 Thread BareFeet
Hi Vivien, >> BareFeet wrote: >> >> Is there any way to parse a create statement (eg create table, create view, >> create trigger) into its components? >> >> Since SQLite does this internally using the Lemon parser, surely there's a >> simple way to get the parser results? Vivien wrote: >

Re: [sqlite] SQL Crash with sqlite 3.6.22 commandline

2010-01-21 Thread Tom Holden
The point is not how the table was created but rather that the absence of the RMNOCASE collation causes the query to crash the latest versions of sqlite while earlier versions gracefully report an error. Moreover, having saved a VIEW from this query resulted in these managers of later releases

Re: [sqlite] Index creation in a memory database

2010-01-21 Thread David Alcelay
Hi! Uppsss, sorry about it, I wrote it incomplete, because we were talking about another part of the sentence. The next one is the original sentence I asked here what was wrong:create index memoria.Dispositivos_TipoDispositivo on memoria.Dispositivos (Tipo_Dispositivo) So you see that the

Re: [sqlite] SQL Crash with sqlite 3.6.22 commandline

2010-01-21 Thread ve3meo
I originally experienced the problem using a couple of Windows sqlite managers. It seems that ones using the latest few versions of sqlite have the problem, variously reported as: "Access violation at address x in module . Read of address 0005", where x is dependent on the

Re: [sqlite] Compile time warning

2010-01-21 Thread Daniel Carrera
D. Richard Hipp wrote: > This is caused by a bug in GCC. > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42688 > has additional information. But the bug appears to be harmless > (correct code is generated in spite of the warning). So you should > simply ignore it. Thanks.

Re: [sqlite] SQL Crash with sqlite 3.6.22 commandline

2010-01-21 Thread Pavel Ivanov
> I am unable to reproduce this problem.  Using the script below, with > RMNOCASE changed to just NOCASE Probably that's exactly the point of crash in the OP's test case. He created table when RMNOCASE collation existed but then tries to execute query when that collation is not registered and

Re: [sqlite] SQL Crash with sqlite 3.6.22 commandline

2010-01-21 Thread D. Richard Hipp
I am unable to reproduce this problem. Using the script below, with RMNOCASE changed to just NOCASE, everything works fine on the SQLite command-line shell on the website on Linux. I also tried various other versions of SQLite with the same result. On Jan 21, 2010, at 8:00 AM, Hub Dog

Re: [sqlite] Index creation in a memory database

2010-01-21 Thread Griggs, Donald
Regarding: Maybe the question for this issue is why it's not ok this syntax: create index memoria.Dispositivos_TipoDispositivo on memoria.Dispositivos >From my reading of the CREATE INDEX syntax at: http://www.sqlite.org/lang_createindex.html the parentheses are required, not

Re: [sqlite] Compile time warning

2010-01-21 Thread D. Richard Hipp
On Jan 21, 2010, at 7:54 AM, Daniel Carrera wrote: > Hello, > > I have a simple program that uses SQLite. When I compile it I see the > following warning: > > /home/daniel/.local/lib/libsqlite3.a(sqlite3.o): In function `memset': > /usr/include/bits/string3.h:82: warning: memset used with

[sqlite] Compile time warning

2010-01-21 Thread Daniel Carrera
Hello, I have a simple program that uses SQLite. When I compile it I see the following warning: /home/daniel/.local/lib/libsqlite3.a(sqlite3.o): In function `memset': /usr/include/bits/string3.h:82: warning: memset used with constant zero length parameter; this could be due to transposed

[sqlite] SQL Crash with sqlite 3.6.22 commandline

2010-01-21 Thread Hub Dog
I hava a table. The table schema is CREATE TABLE AddressTable ( AddressID INTEGER PRIMARY KEY , AddressType INTEGER , Name TEXT COLLATE RMNOCASE , Street1 TEXT , Street2 TEXT , City TEXT , State TEXT , Zip TEXT , Country TEXT , Phone1 TEXT , Phone2 TEXT , Fax TEXT ,

Re: [sqlite] Index creation in a memory database

2010-01-21 Thread David Alcelay
Hi Simon! That was the solution. I thought I have tested all the combinations but I was wrong. Maybe the question for this issue is why it's not ok this syntax: create index memoria.Dispositivos_TipoDispositivo on memoria.Dispositivos Thank you, David

Re: [sqlite] Index creation in a memory database

2010-01-21 Thread Simon Davies
2010/1/21 David Alcelay : > Hi Igor! > Thanks for your reply. > I tested my self that solution before sending the question, but didn't work. > I have tested again now (may be I did not ok before), but the same result:     > near ".": syntax error Did you try create

[sqlite] Index creation in a memory database

2010-01-21 Thread David Alcelay
Hi Igor! Thanks for your reply. I tested my self that solution before sending the question, but didn't work. I have tested again now (may be I did not ok before), but the same result: near ".": syntax error Any idea? Thanks in advance, David ___

Re: [sqlite] Parsing create statements

2010-01-21 Thread Vivien Malerba
> BareFeet wrote: >> At the moment I am resorting to developing regular expressions to do the >> parsing. They work, but it seems to be re-inventing the wheel. > > You won't be able to do parsing completely with regular expressions.  Create > statements let you specify default values for a column

Re: [sqlite] Attached database

2010-01-21 Thread Tiberio, Sylvain
Ok, as the ATTACH is not committed into the database, I understand why we cannot have cross-database constraints. Thanks! Sylvain -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Wednesday, January 20, 2010