On Thu, Aug 26, 2010 at 11:59:03AM -0400, Igor Tandetnik scratched on the wall: > Jay A. Kreibich <j...@kreibi.ch> wrote:
> >> So you are trying to create a VIEW which does already exist. In that > >> case, there's no mystery about why you're getting an error message. > > > > No, he's trying the *PREPARE* a CREATE VIEW *statement* for a view > > that already exists. Prepare != execute. > > It's quite reasonable that the schema is checked at prepare time. > For example, you would expect an error on preparing, rather than > executing, a SELECT statement that mentions a non-existent table. I suppose it is reasonable, but I can see both sides. Doing it at prepare makes a lot of code simpler, but it also makes some techniques (like pre-preparing big sets of statements) more difficult. Given that SQLite DDL commands are transactional (a somewhat unique feature), there is also a fixed, "known state" for executing. Part of me thinks it odd to couple preparing with executing, since that's different from how the data operations work. On the other hand, most simple things would be much more complex if errors were only returned on execution. It's too bad these can't be some kind of warning, rather than an all-out error. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users