Ah I see now. Thank you Keith! Tom
Message: 14 Date: Tue, 04 Feb 2020 14:57:06 -0700 From: "Keith Medcalf" <kmedc...@dessus.com> To: "SQLite mailing list" <sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] unsafe use of virtual table Message-ID: <62147479ae781d49902e13c3c23a3...@mail.dessus.com> Content-Type: text/plain; charset="utf-8" This is part of the trusted schema. Virtual Tables and Functions can be labeled as DIRECT_ONLY, INNOCUOUS, or unlabeled. INNOCUOUS virtual tables and functions can be used anywhere they are allowed including in the schema and views and indexes and so forth (provided that they would otherwise be permitted in that location). DIRECT_ONLY virtual tables and functions can only be used from top-level SQL, ever. Unlabeled virtual tables and views depend on whether or not the schema is trusted. If the schema containing those things (in views, the schema definitions, etc) is untrus ted, then those unlabeled virtual tables and functions are treated as DIRECT_ONLY. If the schema is trusted, then there are no restrictions on the use of unlabeled virtua l tables and functions. The TEMP schema is always trusted since it must have always been created by the application/user and cannot have been a "crafted part" of the data base. The dbstat virtual table is DIRECT_ONLY meaning that since 3.30.0 it can only be used in top-level (directly issued) SQL and not in a view, even a view created in the temp database. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users