Hello again everyone,

I went through the ALTER TABLE docs but could not find anything describing this 
behavior:


SQLite version 3.29.0 2019-04-27 20:30:19
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table t1(f1);
sqlite> create view v1 as select * from t1;
sqlite> drop table t1;
sqlite> create table t2(f1);
sqlite> .schema
CREATE VIEW v1 as select * from t1;
CREATE TABLE t2(f1);
sqlite> alter table t2 rename to t20;
Error: error in view v1: no such table: main.t1


That is, if an invalid view exists in the schema, then any attempt to alter the 
name of another unrelated table will fail with the error message that there is 
a view that references a different table that does not exist.

It also occurs in 3.27 but I downloaded and tried it on 3.29 just in case 
something changed recently.

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

Reply via email to