Hello,

One of the expected changes in 3..9.0 is:
A view may now reference undefined tables and functions when initially  
created. Missing tables and functions are reported when the VIEW is  
used in a query.
I could not resist trying a recursive view like in a CTE:

SQLite version 3.8.12 2015-10-07 13:24:27
create view v as select 1 as c union all select c+1 from v where c<10;
select c from v;
Error: view v is circularly defined

So this is clearly not intended.

One minor shortcoming however. If combined with the other new feature:
The CREATE VIEW statement now accepts an optional list of column names  
following the view name.
the clarifying error message no longer appears and instead comes a  
kind of bus error. I suppose this should be fixed.

I am still puzzled by this error message (view %s is circularly  
defined) itself as it already exists in earlier sqlite versions. But I  
can not make it appear there. Above case raises  "no such table:  
main.v".

Thanks, Edzard


Reply via email to