by checking the codes, i could see temp_store_directory is used to overide
the platform-specific default temp directory in run time.
That is, if temp_store_directory is 0 (the default value of
temp_store_directory), then OS layer (os_win.x and os_unix.x) will provide
the OS default temp directory. (for example, */var/tmp, /usr/tmp for unix*).


if temp_store_directory is configured by pragma, then the
configured  temp_store_directory will be used instead of OS default one.

the following code is from os_win.c :: sqlite3WinTempFileName()

 if( sqlite3_temp_directory )
 {
  ... ...
 }else if( isNT() )
 {
  ... ...
 }



On 6/7/07, Tom Briggs <[EMAIL PROTECTED]> wrote:


  I can see your point, I guess, though I can't say that it seems like
a major issue to me.

  Just out of curiosity, why aren't the defaults derived in os_win.x
and os_unix.c sufficient?

> -----Original Message-----
> From: weiyang wang [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 06, 2007 11:17 AM
> To: [email protected]
> Subject: Re: [sqlite] sqlite3_temp_directory in main.c
>
> the concern here is to configure the default temp directory in library
> compile time, on the OS porting layer.
> in current version, the default value of
> sqlite3_temp_directory is hardcoded
> as 0 in main.c for all platforms.
> would it be better to make it configrable for different
> platforms and use
> PRAGMA to overide the defult in runtime.
>
> i am looking forward to your opiniions.
>
> thanks again.
>
> wang
>
> On 6/6/07, Tom Briggs <[EMAIL PROTECTED]> wrote:
> >
> >
> >   Why not just use PRAGMA temp_store_directory, as the comments
> > directly above that line suggest?
> >
> > > -----Original Message-----
> > > From: weiyang wang [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, June 06, 2007 7:09 AM
> > > To: sqlite-users
> > > Subject: [sqlite] sqlite3_temp_directory in main.c
> > >
> > > hi,
> > >
> > > i found the following line in main.c
> > >
> > > char *sqlite3_temp_directory = 0;
> > >
> > > which seems to remove the possibilities that the customer
> > > platform could
> > > specify sqlite3_temp_directory.
> > >
> > > i suggest that this line is removed.
> > >
> > > any comments?
> > >
> > > thanks in advance.
> > >
> > > wang
> > >
> >
> >
> >
> --------------------------------------------------------------
> ---------------
> > To unsubscribe, send email to [EMAIL PROTECTED]
> >
> >
> --------------------------------------------------------------
> ---------------
> >
> >
>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]

-----------------------------------------------------------------------------


Reply via email to