Re: [sqlite] FTS statistics and stemming

2008-07-28 Thread Stephen Woodbridge
Scott Hess wrote: > On Sat, Jul 26, 2008 at 1:28 PM, Stephen Woodbridge > <[EMAIL PROTECTED]> wrote: >> Alexey Pechnikov wrote: >>> I'm know that ispell, myspell, hunspell and trigrams are used in PostgreSQL >>> FTS. A lot of languages are supported this. And soundex function useful for >>>

Re: [sqlite] FTS statistics and stemming

2008-07-28 Thread Scott Hess
On Sat, Jul 26, 2008 at 1:28 PM, Stephen Woodbridge <[EMAIL PROTECTED]> wrote: > Alexey Pechnikov wrote: >> I'm know that ispell, myspell, hunspell and trigrams are used in PostgreSQL >> FTS. A lot of languages are supported this. And soundex function useful for >> morphology search if to write

Re: [sqlite] tcl/sqlite glitch on FreeBSD ...

2008-07-28 Thread Rob Sciuk
On Mon, 28 Jul 2008, Rob Sciuk wrote: >> top of mutex.h: >> >> #ifdef __FreeBSD__ >> #define SQLITE_HOMEGROWN_RECURSIVE_MUTEX 1 >> #endif OK, I've tracked the resulting glitch to a rivet dependancy, and the code now works with the suggested define included!!! I'm not entirely sure the status

Re: [sqlite] Journal deletion: no directory fsync?

2008-07-28 Thread Glenn Maynard
On Mon, Jul 28, 2008 at 12:46:42PM -0500, Brian Smith wrote: > Glenn Maynard wrote: > > After finishing a transaction and deleting the rollback > > journal, no directory fsync is performed. If the system > > crashes immediately after a commit returns to the caller, the > > unlink may not have

Re: [sqlite] Convert the CURRENT_TIMESTAMP

2008-07-28 Thread Joanne Pham
Hi, Thanks for the big help. Finally I got it worked as expected and the sql statement below to return the format as: #device local time = MON JUL 28 10:57:30 2008. Another question that I have is to set this select statement in the variable so I can repeated to print out the variable again and

Re: [sqlite] Journal deletion: no directory fsync?

2008-07-28 Thread Brian Smith
Glenn Maynard wrote: > After finishing a transaction and deleting the rollback > journal, no directory fsync is performed. If the system > crashes immediately after a commit returns to the caller, the > unlink may not have been flushed to disk, causing the journal > to be rolled back and

Re: [sqlite] tcl/sqlite glitch on FreeBSD ...

2008-07-28 Thread Rob Sciuk
Wow!, Thanks for your very swift reply, Sir. On Mon, 28 Jul 2008, D. Richard Hipp wrote: > Perhaps FreeBSD does not implement recursive mutexes. In that case, you can > try to recompile with -DSQLITE_HOMEGROWN_RECURSIVE_MUTEX=1 and see if that > helps. It would be good to review the

Re: [sqlite] tcl/sqlite glitch on FreeBSD ...

2008-07-28 Thread D. Richard Hipp
On Jul 28, 2008, at 12:53 PM, Rob Sciuk wrote: > > I've enabled the thread-safe option, and compiled sqlite3.5.9 against > tcl8.5.3, also PDO in PHP 5.2.5, and used it in web sites both with > PHP, > and Tcl/Rivet under Apache 1.3.41. Sqlite seems to consistently choke > either in rivet, or

Re: [sqlite] Convert the CURRENT_TIMESTAMP

2008-07-28 Thread Joanne Pham
Thank you so much Jon and Igor! Both are wokred!! Thanks a ton, JP - Original Message From: Jon Dixon <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Saturday, July 26, 2008 6:12:21 AM Subject: Re: [sqlite] Convert the CURRENT_TIMESTAMP Alternatively, enclosing the numbers in

[sqlite] tcl/sqlite glitch on FreeBSD ...

2008-07-28 Thread Rob Sciuk
I've enabled the thread-safe option, and compiled sqlite3.5.9 against tcl8.5.3, also PDO in PHP 5.2.5, and used it in web sites both with PHP, and Tcl/Rivet under Apache 1.3.41. Sqlite seems to consistently choke either in rivet, or under PHP with a similar problem: Fatal error

Re: [sqlite] threads and database lock

2008-07-28 Thread Dan
On Jul 28, 2008, at 10:58 PM, Sébastien Escudier wrote: > Quoting Dan : >> Post the test program and somebody will tell you. > > ok, you can find my test source here : > http://cjoint.com/data/hCr0WHZYHf.htm > and create test.bdd with : CREATE TABLE test(test INTEGER); > > I have this output : >

Re: [sqlite] threads and database lock

2008-07-28 Thread Sébastien Escudier
Quoting Dan : > Post the test program and somebody will tell you. ok, you can find my test source here : http://cjoint.com/data/hCr0WHZYHf.htm and create test.bdd with : CREATE TABLE test(test INTEGER); I have this output : ./base_test sqlite version : 3.5.9 threadsafe = 1 DEBUG : sleep after

Re: [sqlite] threads and database lock

2008-07-28 Thread Dan
On Jul 28, 2008, at 10:18 PM, Sébastien Escudier wrote: > > > Hi > > I'd like to test thread safeness, so I created a test program which : > - spawns two threads (let call them R thread and W thread) > - R tread execute BEGIN EXCLUSIVE; and sleep for a long time > - Then W thread tries to write

[sqlite] threads and database lock

2008-07-28 Thread Sébastien Escudier
Hi I'd like to test thread safeness, so I created a test program which : - spawns two threads (let call them R thread and W thread) - R tread execute BEGIN EXCLUSIVE; and sleep for a long time - Then W thread tries to write in the database and... succeeds sqlite3_threadsafe returns 1 and I

Re: [sqlite] special characters as column names

2008-07-28 Thread Michael Schlenker
Avner Levy schrieb: > Hi, > I have a table with column names like "hit/s" and "runq-sz". > How can I escape characters like the "/" and "-" in a select statement? > for example "select hit/s, runq-sz from mytable" won't work. > Escape the name, for example with "", sqlite supports some other

Re: [sqlite] empty result sets without column names?

2008-07-28 Thread Markus Hoenicka
Quoting Nuno Lucas <[EMAIL PROTECTED]>: > You probably want to look at the "empty_result_callbacks" PRAGMA. > Although the manual only mention sqlite3_exec, it's also used by > sqlite3_get_table(). > This looks like what we need. I assume that sqlite3_get_table() returns the correct number of

Re: [sqlite] Convert the CURRENT_TIMESTAMP

2008-07-28 Thread Igor Tandetnik
"Jon Dixon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Alternatively, enclosing the numbers in single quotes ( ... when '0' > then 'SUN' when '1' then 'MON' ...) will give you the expected > result. If you want to go this way, be aware that %m specifier produces strings like

Re: [sqlite] Convert the CURRENT_TIMESTAMP

2008-07-28 Thread Jon Dixon
Alternatively, enclosing the numbers in single quotes ( ... when '0' then 'SUN' when '1' then 'MON' ...) will give you the expected result. Jon -Inline Message Follows- Igor Tandetnik wrote: "Joanne Pham" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all , > I have

Re: [sqlite] Sqlite Endianness

2008-07-28 Thread Dan
On Jul 25, 2008, at 10:50 PM, Dave Gierok wrote: > Does anyone know what endianness a Sqlite database is stored in? > Or does that depend on the endianness of the machine it was created > on? I am wondering because we ship a game that runs on Xbox 360, > which uses the PowerPC

Re: [sqlite] Sqlite Endianness

2008-07-28 Thread Steve Kallenborn
But please don't do this! The resulting database files will NOT be sqlite database files. You won't be able to look at them on other systems (or even using the 'real' library on the same system). Thanks Steve Shane Harrelson wrote: > If you're really serious about storing your data in a

Re: [sqlite] empty result sets without column names?

2008-07-28 Thread Markus Hoenicka
Quoting Igor Tandetnik <[EMAIL PROTECTED]>: > Don't use sqlite3_get_table. Use sqlite3_column_name, > sqlite3_column_origin_name et al. You can call these on a prepared > statement without even having to run it, so it doesn't matter whether it > returns any rows or not. > > If all you want is to