SQLite Forum

PRAGMA temp_store_directory
Login
There is only ONE temp store directory per process.  So whatever you set last in the process is what will be used.  (Note this does not change the actual temp store directory which is under control of the Operating System, but rather changes the location where the SQLite3 library will write its temp files -- it will not change where the rest of your program writes its temp files).

If there were interference between temp files then it would not be much of a temp file system.  What experimental OS are you using that you cannot trust its' handling of temp files?

Note that I use an Experimental OS from Microsoft which has never been able to manage its temp files since MSDOS 1.0 though to and including the current release of Windows.  Its problem however is not a failure to manage the temp file naming, but rather a failure of ability to discard the excrement.  Consequently ever since about 1979 a "diaper pump" has been needed to keep the excrement in check lest the baby drown in its own excrement.  For each version since MSDOS 1.0 the number of temp file locations that must be regularly pumped out (and the frequency of the pumpings required) has grown exponentially.

I would consider an application that creates yet another "bilge" in need of pumping when it could be using the already existing sewer system to be a big vote against ever allowing the use of such as application.