On 31 Aug 2011 at 23:24, Igor Tandetnik <itandet...@mvps.org> wrote: 

> On 8/31/2011 5:56 PM, Tim Streater wrote:
>> In the above, each database is newly created as shown. What I had
>> forgotten to do was to create the "test" table in the second database
>> before copying the data. What seems to happen is that, lacking a
>> "test" table in the test2 database, SQLite appears to assume that I
>> must mean the "test" table in the test1 database - it tries to copy
>> data from the table into itself and so gets the error above.
>
> Yes. This is documented behavior - see http://sqlite.org/lang_attach.html.

Thanks for that helpful link. I'm sure I've looked at it before, but didn't 
register all the details of how it works. Now I see there's a way of referring 
to the original database as main, I'll use fully qualified table names wherever 
I have attached databases.

>> Is this reasonable behaviour? I might have expected to have a "no such table"
>> error.
>
> Which part of the documentation might have led you to expect that?

No part :-)

Sorry for the lack of subject line originally BTW.

--
Cheers  --  Tim
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to