I had a bad programming experience with temporary tables and after some
googling I found this old post

   [sqlite] How to select from a temp table with same name as a main table.
   dochsm Tue, 18 Jun 2013 05:39:04 -0700

that illustrated exactly the same troubles.
In short, if you have a table named A and a temporary table named TEMP.A,
then if you want to refer to the A table, it is strongly recommended to
explicitly call it MAIN.A ( otherwise if you simply refer to A, you will
pick ... TEMP.A )

In my opinion, and for my experience, I find this behavior
counter-intuitive, so I ask if it's possibile to change it in a future
release,
so that "A"  always refer to MAIN.A and TEMP.A refers to TEMP.A.

Since this change may break some old programs logic, I suggest to introduce
a new PRAGMA named "IMPLICIT_MAINDB_PREFIX" (or or better name ..), so that
if a table-name is not prefixed by a db-name, then MAIN is assumed.

regards
  A.Buratti
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to