SQLite Forum

Apparent bug in ALTER TABLE
Login
My improvement suggestion would be that the check whether any view references a non-existent table, and the error if one does, should simply be removed from ALTER TABLE. I can't see any benefit from it at all. The existence of such a view does not, as far as I can see, prevent ALTER TABLE from working as specified. Nobody in this thread has yet offered any explanation of why the check *needs* to be there.

If it is desired to have such a check available *somewhere* (and I can see reasons why it might be wanted), it should be implemented independently from ALTER TABLE, perhaps by a PRAGMA as I suggested.

I can't see why people would be likely to object to this. The check was not in the legacy ALTER TABLE, and its existence in the post 3.26 ALTER TABLE appears to be undocumented, so normal sqlite users would not be relying on it.

I have not suggested any change to the legacy behaviour as implied by Larry. The eheck did not exist then, or at least if it was done internally it did not provoke any error.