Hello!

On Monday 30 November 2009 20:22:43 wcl...@gfs-hofheim.de wrote:
> Is there a technical reason why triggers work, but views don't, or is this 
> just a feature that's not currently supported in views?  I know that I can 
> create a temporary view and this works.  Is this something I can "hack" 
> easily and has anyone any experience?  I'm not afraid of getting my 
> fingers dirty!

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;


Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to