Alexey Pechnikov wrote on 30/11/2009 19:58:15: > This feature was disabled becouse can produce inconsistent database schema. > If you want to enable this feature then the patch is simple: > > --- sqlite3-3.6.20.orig/src/attach.c > +++ sqlite3-3.6.20/src/attach.c > @@ -447,10 +447,11 @@ > if( pItem->zDatabase==0 ){ > pItem->zDatabase = sqlite3DbStrDup(pFix->pParse->db, zDb); > }else if( sqlite3StrICmp(pItem->zDatabase,zDb)!=0 ){ >- sqlite3ErrorMsg(pFix->pParse, >+/* sqlite3ErrorMsg(pFix->pParse, > "%s %T cannot reference objects in database %s", > pFix->zType, pFix->pName, pItem->zDatabase); >- return 1; >+ return 1;*/ >+ return 0; > } > #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) > if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
Thank you for the patch. This was certainly the area I was playing with. However, I had actually commented out the entire "else if" clause. Surely it should continue onto the next part of the sqlite3FixSrcList function rather than exit immediately, or am I this wrong? Also, is it better to only disable this check for views (pFix->zType can be used to determine whether view, trigger or index)? I assume the error would still be necessary for indexes, even though triggers seem to ignore it anyway. Thanks Will _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users