SQLite Forum

Using a VFS shim together with another user-specified VFS
Login
Thanks, David, for the sketch how the problem could be possibly tackled.

The approach sounds rather tricky, especially, if a user has several database connections open, possibly using different VFSes. If I understood it correctly, the VFS names need to be unique. That is, I would have to create a clone of the VFS shim with a different name for each different underlying VFS.

The main problem I see is that I would have to create VFS shim clones for all potential underlying VFSes in advance, because the SQLite code analyzing the URI parameters already calls `sqlite3_vfs_find`. And this can't be easily intercepted. 

I get the impression that this approach isn't going to work in the general case, when I do not know in advance which underlying VFSes the user might want to use.