SQLite Forum

Have sqlite3_deserialize() create new attached DBs
Login
Hi. I'm using the [zipfile extension](https://www.sqlite.org/zipfile.html) and [sqlite3_deserialize()](https://www.sqlite.org/capi3ref.html#sqlite3_deserialize) together (both for the first time), and they are great. Thanks for them!

But one thing that surprised me, was that the 2nd arg to `sqlite3_deserialize()` cannot be a new name.  
I've worked around that, but using a dummy `"attach 'file:foo?mode=memory' as foo`, so I can use *`"foo"`* as that 2nd arg.  
Repeating with `bar`, `baz`, etc... for the other DBs I *attach* to the main memory DB.

But my question is why not simply do the attach directly in the API?  
That way, no need to create an empty throw-away memory DB for nothing, no?