open the database "test.db"
then execute the following sql commands
ATTACH 'test.db' AS hey
PRAGMA database_list
# [0, "main", "/Users/boson/workspace/test.db"]
# [2, "hey", "/Users/boson/workspace/test.db"]
DETACH [hey]
# error: no such database: [hey]
DETACH hey
# success

# also note:
ATTACH 'test.db' AS [hey]
PRAGMA database_list
# [0, "main", "/Users/boson/workspace/test.db"],
# [2, "hey", "/Users/boson/workspace/test.db"]]

So it seems that the [database name] syntax is not understood by DETACH. This seems inconsistent.

In attach.c the function
void sqlite3Detach(Parse *pParse, Token *pDbname)
sqlite3NameFromToken() is not called on the Dbname token.

I am using sqlite 3.0.8, haven't had chance to grab the latest release yet. (So maybe this is already fixed?)

-Charlie



Reply via email to