When I was digging around trying to figure out why things wern't working
the way I thought they should I came across a function in the sqlite
code called getTempname. In certain situations(i.e. the
temp_store_directory is not set), this function will get a tempname
based on an environment variable.
It seems as though there are different implementations of getTempname
depending on OS.
in one implenetation we have the following :
if( sqlite3_temp_directory ){
zTempPath = sqlite3_temp_directory;
}else{
if( DosScanEnv( (PSZ)"TEMP", &zTempPath ) ){
if( DosScanEnv( (PSZ)"TMP", &zTempPath ) ){
if( DosScanEnv( (PSZ)"TMPDIR", &zTempPath ) ){
in the other we have :
azDirs[0] = sqlite3_temp_directory;
if (NULL == azDirs[1]) {
azDirs[1] = getenv("TMPDIR");
}
So it seems as if TMPDIR will work in two different OSes.
Robert Citek wrote:
> On Thu, Jan 7, 2010 at 10:42 AM, Jay A. Kreibich<[email protected]> wrote:
>> On Thu, Jan 07, 2010 at 10:35:21AM -0500, Robert Citek scratched on the wall:
>>> You mention a temp environment variable. I've googled through the
>>> sqlite.org site and haven't found any mention of an environment
>>> variable. What environment variable can I set to change the default
>>> value for the temporary directory?
>>
>> http://sqlite.org/pragma.html#pragma_temp_store_directory
>>
>> It is a PRAGMA, not an env var. Also see "PRAGMA temp_store".
>
> Yes, I was aware of the pragma. I was hoping for an environment
> variable so that I don't have to write pragmas in my code.
>
> Regards,
> - Robert
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users