So, just be sure we are in the same page:

>From the C interface, the way to decide the directory is setting the
value of sqlite3_temp_directory char pointer. As explained here:
https://www.sqlite.org/c3ref/temp_directory.html
This is also the first place sqlite3 checks.

>From anywhere else sqlite3 checks the value of those env variables:
SQLITE_TMPDIR, TMPDIR, TMP, TEMP, USERPROFILE. And if everything
fails, sqlite3 goes in the standard system location for temporary
files (e.g., /tmp in Linux).
It is the case?

I agree with Zsb?n Ambrus that it should be documented.

On Mon, Jul 27, 2015 at 11:30 PM, Simon Slavin <slavins at bigfraud.org> wrote:
>
>> On 27 Jul 2015, at 10:18pm, Zsb?n Ambrus <ambrus at math.bme.hu> wrote:
>>
>> On Mon, Jul 27, 2015 at 9:35 PM, Simon Slavin <slavins at bigfraud.org> 
>> wrote:
>>> On 27 Jul 2015, at 8:03pm, Zsb?n Ambrus <ambrus at math.bme.hu> wrote:
>>> I tried this once a couple of years ago, and both platforms use whatever 
>>> the expected variable name was for that OS.  In other words, a native 
>>> programmer to that OS would get whatever behaviour they expected.
>>
>> Hopefully that means TMPDIR on unix and TEMP on windows, which seem to
>> be the most widely used environment variables for this.
>>
>> [snip]
>>
>> From the source code, it seems that for at least some operations,
>> sqlite3 checks the following environment variables: SQLITE_TMPDIR,
>> TMPDIR, TMP, TEMP, USERPROFILE.
>
> Sorry, I got a detail wrong.  I tested Mac, Windows and Linux, not Unix.  On 
> all platforms I checked to see that changing the expected documented 
> environment variable had the right effect.  I didn't test what happened if 
> you changed another variable.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to