On 3/29/2019 9:55 AM, Dan Kennedy wrote:

On 29/3/62 03:00, Igor Tandetnik wrote:
On 3/28/2019 3:21 PM, Mark Wagner wrote:
Imagine I have these two tables and one view defining a join.

CREATE TABLE t (foo);
CREATE TABLE s (bar);
CREATE VIEW v as select * from t join s on (foo = q);

Surprisingly, this last statement succeeds. But if you then close the database and try to 
open it again, it'll fail with "no such column: q". So, don't do this - you are 
creating an unusable database file with corrupted schema.


The error doesn't occur unless you actually query the view though, correct?

Yes, I think the tool I was using tries to use the view right after opening the 
database, probably to figure out what columns it offers. This led me to 
erroneously conclude that merely opening the database triggers the error.
--
Igor Tandetnik


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to