Re: [sqlite] view and attach database problem

2009-02-27 Thread Kees Nuyt
On Sat, 28 Feb 2009 00:20:48 +0300, Alexey Pechnikov wrote: >Hello! > >On Friday 27 February 2009 21:50:30 Kees Nuyt wrote: >> A view or trigger in one database is not allowed to >> reference tables (or other views) in other databases. The >> reason is, the schema of the main database (in this ca

Re: [sqlite] view and attach database problem

2009-02-27 Thread Alexey Pechnikov
Hello! On Friday 27 February 2009 21:50:30 Kees Nuyt wrote: > A view or trigger in one database is not allowed to > reference tables (or other views) in other databases. The > reason is, the schema of the main database (in this case > your :memory: database) would be invalid once the main > databa

Re: [sqlite] view and attach database problem

2009-02-27 Thread Kees Nuyt
On Fri, 27 Feb 2009 16:25:28 +0300, Alexey Pechnikov wrote: >Hello! > >I did try > >$ sqlite3 :memory: >SQLite version 3.6.11 >Enter ".help" for instructions >Enter SQL statements terminated with a ";" >sqlite> attach database 'merch.db' as work; >sqlite> create view test as select * from work.us

Re: [sqlite] view and attach database problem

2009-02-27 Thread Alexey Pechnikov
Hello! On Friday 27 February 2009 16:25:28 Alexey Pechnikov wrote: > But it's work some time ago! How can I create view for attached databases > now? Create table is bad becouse attached database may be huge. I did patch attach.c as /* sqlite3ErrorMsg(pFix->pParse, "%s %T cannot re

[sqlite] view and attach database problem

2009-02-27 Thread Alexey Pechnikov
Hello! I did try $ sqlite3 :memory: SQLite version 3.6.11 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> attach database 'merch.db' as work; sqlite> create view test as select * from work.users; SQL error: view test cannot reference objects in database work But