[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-20 Thread Paolo Bolzoni
Scott you can still set it up using setenv(Posix) or _putenv_s_(Windows). Can't you? On Wed, Aug 19, 2015 at 10:23 AM, Scott Doctor wrote: > > Another issue to consider is security. Some programs, such as mine, needs to > carefully control temporary files. Unless the user selects a specific >

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-19 Thread Paolo Bolzoni
Wouldn't be easier to simply add a parameter to sqlite3_initialize()? E.g., a char const pointer to the tmp directory? That, if null, defaults to something reasonable as James mentioned? Maybe I am oversensitive, but I found strange I have to use setenv to setup a command line option about "where

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-19 Thread Simon Slavin
On 19 Aug 2015, at 1:28am, Paolo Bolzoni wrote: > Wouldn't be easier to simply add a parameter to sqlite3_initialize()? > E.g., a char const pointer to the tmp directory? That, if null, > defaults to something reasonable as James mentioned? The correct place for temp files varies from

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-18 Thread Scott Doctor
Another issue to consider is security. Some programs, such as mine, needs to carefully control temporary files. Unless the user selects a specific directory for temporary files, the files are put in a subdirectory of the program directory, created at run-time, then is security erased when

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-18 Thread James K. Lowden
On Sat, 15 Aug 2015 01:17:28 +0100 Simon Slavin wrote: > > BTW, Posix is almost silent on the question. It says TMPDIR will > > define the location of a temporary store, but not how. > > I'm okay if the documentation simply says something like ... > > For Darwin (Mac), it's always /tmp/ >

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-17 Thread Paolo Bolzoni
If the problem is the multi-threading, it would be not enough to simply document that the tmp directory should be set before spawning any thread? e.g., in the main? On Sat, Aug 15, 2015 at 9:17 AM, Simon Slavin wrote: > >> On 15 Aug 2015, at 12:53am, James K. Lowden >> wrote: >> >> Simon

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-17 Thread Simon Slavin
On 17 Aug 2015, at 8:11am, Paolo Bolzoni wrote: > If the problem is the multi-threading, it would be not enough to > simply document that the tmp directory should be set before spawning > any thread? e.g., in the main? It's partly a philosophical one. The setting for the temporary directory

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-15 Thread Simon Slavin
> On 15 Aug 2015, at 12:53am, James K. Lowden > wrote: > > Simon Slavin wrote: > ... >> If it's going to be documented, it would also be nice to see it on >> >> >> >> which, according to my browser, doesn't mention the word >> 'environment'. > > I

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-08-14 Thread James K. Lowden
On Mon, 27 Jul 2015 20:35:30 +0100 Simon Slavin wrote: > On 27 Jul 2015, at 8:03pm, Zsb?n Ambrus wrote: > > > Does this work with the same environment variable name on both unix > > and windows? I'm asking because unix and windows programs each use > > different conventions for what

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-31 Thread Eduardo Morras
On Thu, 30 Jul 2015 23:29:49 + Howard Kapustein wrote: > >There cannot be a fully portable way, because path specifications > >are not portable > Which begs the question, why isn't there an xGetTempFilename VFS > function in sqlite3_vfs? > > Wouldn't the simplify things? Have the VFS handle

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-31 Thread Howard Kapustein
essage. -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin Sent: Tuesday, July 28, 2015 4:31 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] pragma temp_store_dir

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-30 Thread Scott Hess
sers-bounces at mailinglists.sqlite.org [mailto: > sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Simon Slavin > Sent: Tuesday, July 28, 2015 4:31 AM > To: General Discussion of SQLite Database < > sqlite-users at mailinglists.sqlite.org> > Subject: Re: [sqlite] pragma

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-28 Thread Simon Slavin
On 28 Jul 2015, at 9:55am, Paolo Bolzoni wrote: > 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. The

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-28 Thread Simon Slavin
On 28 Jul 2015, at 10:49am, Paolo Bolzoni wrote: > I guess it is not really a problem, but it means that a part of the > deprecated pragma there is no fully portable way? There cannot be a fully portable way, because path specifications are not portable. For instance, "C:\temp" means

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-28 Thread Paolo Bolzoni
I guess it is not really a problem, but it means that a part of the deprecated pragma there is no fully portable way? On Tue, Jul 28, 2015 at 10:56 AM, Clemens Ladisch wrote: > Simon Slavin wrote: >> both platforms use whatever the expected variable name was for that OS. > > Unix: > 1. #pragma

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-28 Thread Clemens Ladisch
Simon Slavin wrote: > both platforms use whatever the expected variable name was for that OS. Unix: 1. #pragma temp_store_directory 2. getenv("SQLITE_TMPDIR") 3. getenv("TMPDIR") 4. /var/tmp 5. /usr/tmp 6. /tmp Cygwin: 1. #pragma temp_store_directory 2. getenv("SQLITE_TMPDIR") 3.

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-28 Thread Paolo Bolzoni
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

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-28 Thread Zsbán Ambrus
On Mon, Jul 27, 2015 at 9:35 PM, Simon Slavin wrote: > On 27 Jul 2015, at 8:03pm, Zsb?n Ambrus 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

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-27 Thread Simon Slavin
> On 27 Jul 2015, at 10:18pm, Zsb?n Ambrus wrote: > > On Mon, Jul 27, 2015 at 9:35 PM, Simon Slavin wrote: >> On 27 Jul 2015, at 8:03pm, Zsb?n Ambrus 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

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-27 Thread Zsbán Ambrus
On Mon, Jul 27, 2015 at 12:28 PM, Richard Hipp wrote: > On 7/27/15, Paolo Bolzoni wrote: >> I found the temp_store_directory, but it is deprecated. So I was wondering, >> what is the suggested alternative? > > Set the TEMP environment variable to the location of your temporary > storage area.

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-27 Thread Simon Slavin
On 27 Jul 2015, at 8:03pm, Zsb?n Ambrus wrote: > Does this work with the same environment variable name on both unix > and windows? I'm asking because unix and windows programs each use > different conventions for what environment variable to care about when > determining the temporary

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-27 Thread Paolo Bolzoni
Dear list, I have a somewhat large sqlite3 db (about 120GB) and I need to create some indexes on it, but I get "database or disk is full" while I have still about 300GB of free disk space. However the /tmp directory is only 5GB so I suspect that sqlite3 has not enough space there. I found the

[sqlite] pragma temp_store_directory is deprecated, what is the alternative?

2015-07-27 Thread Richard Hipp
On 7/27/15, Paolo Bolzoni wrote: > Dear list, > > I have a somewhat large sqlite3 db (about 120GB) and I need to create > some indexes on it, but I get "database or disk is full" while I have > still about 300GB of free disk space. > > However the /tmp directory is only 5GB so I suspect that