Re: [sqlite] WAL for single user database on nfs

2010-11-29 Thread p r
Great thanks for the info. Richard.

Pete




From: Richard Hipp 
To: General Discussion of SQLite Database 
Sent: Wed, November 24, 2010 3:11:57 PM
Subject: Re: [sqlite] WAL for single user database on nfs

On Wed, Nov 24, 2010 at 6:01 PM, p r  wrote:

> I read the following statement on
> http://www.sqlite.org/wal.html#concurrency
>
> ..This is why the write-ahead log implementation will not work on a network
> filesystem...
>
> I can how nfs would be an issue (due to stale handles) if processes from
> different machines were to access the sqlite db but I am thinking of a
> single
> process at a time (of n such processes on 1 machine)  accessing a single
> Sqlite
> database at a time over nfs - is WAL safe/feasible or not supported in that
> mode?
>

I guess it depends on your NFS implementation.  SQLite uses mmap() to get
the shared memory it needs.  Is mmap() supported on NFS files?

Beginning with SQLite version 3.7.4 (due out in about 2 weeks) you can use
WAL mode without shared memory by using "PRAGMA locking_mode=EXCLUSIVE".
That will be a safer approach.



>
> Thanks.
>
> Pete.
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Shane Harrelson
In Visual C, a  "long double" and a "double" are the same, and only
offer 53 bits of precision.
On GCC, a "long double" has 80 bits of precision.
Unfortunately, I don't think there's a way to have Visual C use more precision.
Because of this, round off error will always differ between the two
compilers when using
the "long double" type.

-Shane

On Mon, Nov 29, 2010 at 10:06 PM, Rick Regan  wrote:
> On Mon, Nov 29, 2010 at 3:04 PM, Rick Regan wrote:
>
>
>> So the question remains -- why does the Windows build get it wrong?
>>
>
>
> I think I figured it out. It is due to the use of extended precision. In
> sqlite3.c, if you change "#define LONGDOUBLE_TYPE long double" to "#define
> LONGDOUBLE_TYPE double" and set the FPU precision to 53 bits, you get the
> same wrong result as on Windows.
>
> Obviously, we don't want the same wrong result as on Windows -- so how do we
> fix Windows?
>
> What's the procedure for opening a bug report?
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Mon, Nov 29, 2010 at 3:04 PM, Rick Regan wrote:


> So the question remains -- why does the Windows build get it wrong?
>


I think I figured it out. It is due to the use of extended precision. In
sqlite3.c, if you change "#define LONGDOUBLE_TYPE long double" to "#define
LONGDOUBLE_TYPE double" and set the FPU precision to 53 bits, you get the
same wrong result as on Windows.

Obviously, we don't want the same wrong result as on Windows -- so how do we
fix Windows?

What's the procedure for opening a bug report?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread Igor Tandetnik
john darnell  wrote:
> I just added it to a Visual Studio 8 project, turned off the use of 
> precompiled headers (the project is a C++ project) and
> compiled the SQLite.c file without any errors.

There is no such thing as a C++ project. A project in Visual Studio can happily 
contain both C and C++ files. By default, file extension determines whether the 
file is compiled with C or C++ compiler (.c would indicate C), and this could 
also be overridden in project settings on a per-file basis.
-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread Puneet Kishor


john darnell wrote:
> Thanks, Simon.  I'll take your advice.
>
> Oh and BTW, I apologize for the "Mac truck" remark--I meant no offense to my 
> friends who code for the Mac (grin).

My Mac is Peterbilt.

> R,
> John
>
>> -Original Message-
>> From: sqlite-users-boun...@sqlite.org 
>> [mailto:sqlite-users-boun...@sqlite.org]
>> On Behalf Of Simon Slavin
>> Sent: Monday, November 29, 2010 5:39 PM
>> To: General Discussion of SQLite Database
>> Subject: Re: [sqlite] Just compiled SQLite in Visual Studio
>>
>>
>> On 29 Nov 2010, at 11:10pm, john darnell wrote:
>>
>>> here's that first dumb-sounding question.
>>>
>>> I got my boss to purchase an O'Reilly book called Using SQLite, and the 
>>> author
>> makes a rather ominous statement:  "All of the SQLite source is written in 
>> C...Make
>> sure you use a vanilla C Compiler."
>>> I just added it to a Visual Studio 8 project, turned off the use of 
>>> precompiled
>> headers (the project is a C++ project) and compiled the SQLite.c file 
>> without any
>> errors.  Is it really that easy, or am I about ready to be hit by a Mac 
>> truck filled with
>> bugaboos?
>>
>> That's not dumb, that's "I've been hurt before.".  But you should definitely 
>> use the
>> command-line tool to make a database and see if your application can read it
>> before you relax.
>>
>> Portability is one of the main design criteria for SQLite.  Unlike most SQL 
>> engines
>> you can find these days it needs to run not only on desktop computers but 
>> TVs,
>> phones, and tiny little embedded controllers.  The simplest way to make that
>> happen is to write it in C and make sure it compiles on anything with a C 
>> compiler
>> available.  It's a handicap in some ways, since the programmers can't use 
>> even
>> C++, but it means people developing for any new gadget tend to turn to 
>> SQLite.
>>
>> And if it has to be compilable for a PVR/DVR a Wintel computer is no trouble 
>> at all.
>>
>> Simon.
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread john darnell
Thanks, Simon.  I'll take your advice.  

Oh and BTW, I apologize for the "Mac truck" remark--I meant no offense to my 
friends who code for the Mac (grin).

R,
John

> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
> On Behalf Of Simon Slavin
> Sent: Monday, November 29, 2010 5:39 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Just compiled SQLite in Visual Studio
> 
> 
> On 29 Nov 2010, at 11:10pm, john darnell wrote:
> 
> > here's that first dumb-sounding question.
> >
> > I got my boss to purchase an O'Reilly book called Using SQLite, and the 
> > author
> makes a rather ominous statement:  "All of the SQLite source is written in 
> C...Make
> sure you use a vanilla C Compiler."
> >
> > I just added it to a Visual Studio 8 project, turned off the use of 
> > precompiled
> headers (the project is a C++ project) and compiled the SQLite.c file without 
> any
> errors.  Is it really that easy, or am I about ready to be hit by a Mac truck 
> filled with
> bugaboos?
> 
> That's not dumb, that's "I've been hurt before.".  But you should definitely 
> use the
> command-line tool to make a database and see if your application can read it
> before you relax.
> 
> Portability is one of the main design criteria for SQLite.  Unlike most SQL 
> engines
> you can find these days it needs to run not only on desktop computers but TVs,
> phones, and tiny little embedded controllers.  The simplest way to make that
> happen is to write it in C and make sure it compiles on anything with a C 
> compiler
> available.  It's a handicap in some ways, since the programmers can't use even
> C++, but it means people developing for any new gadget tend to turn to SQLite.
> 
> And if it has to be compilable for a PVR/DVR a Wintel computer is no trouble 
> at all.
> 
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread Simon Slavin

On 29 Nov 2010, at 11:10pm, john darnell wrote:

> here's that first dumb-sounding question.
> 
> I got my boss to purchase an O'Reilly book called Using SQLite, and the 
> author makes a rather ominous statement:  "All of the SQLite source is 
> written in C...Make sure you use a vanilla C Compiler."
> 
> I just added it to a Visual Studio 8 project, turned off the use of 
> precompiled headers (the project is a C++ project) and compiled the SQLite.c 
> file without any errors.  Is it really that easy, or am I about ready to be 
> hit by a Mac truck filled with bugaboos?

That's not dumb, that's "I've been hurt before.".  But you should definitely 
use the command-line tool to make a database and see if your application can 
read it before you relax.

Portability is one of the main design criteria for SQLite.  Unlike most SQL 
engines you can find these days it needs to run not only on desktop computers 
but TVs, phones, and tiny little embedded controllers.  The simplest way to 
make that happen is to write it in C and make sure it compiles on anything with 
a C compiler available.  It's a handicap in some ways, since the programmers 
can't use even C++, but it means people developing for any new gadget tend to 
turn to SQLite.

And if it has to be compilable for a PVR/DVR a Wintel computer is no trouble at 
all.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread john darnell
Hello Folks:

I just started a big project that needed an internal database manager and 
SQLite looks like it will fit the bill.  I am old hat with SQL but have 
absolutely no experience with SQLite, so here's hoping that you folks are a 
real friendly bunch and will help me get up to speed.

Promise:  I will do my homework first before contacting the list so if the 
question seems dumb, believe me, I've tried to figure it out on my own.

Okay, now that that's out of the way, here's that first dumb-sounding question.

I got my boss to purchase an O'Reilly book called Using SQLite, and the author 
makes a rather ominous statement:  "All of the SQLite source is written in 
C...Make sure you use a vanilla C Compiler."

I just added it to a Visual Studio 8 project, turned off the use of precompiled 
headers (the project is a C++ project) and compiled the SQLite.c file without 
any errors.  Is it really that easy, or am I about ready to be hit by a Mac 
truck filled with bugaboos?

R,
John A.M. Darnell
Senior Programmer
Walsworth Publishing Company
Brookfield, MO
John may also be reached at 
johnamdarn...@gmail.com

Trivia SF question:  In the movie, THE MATRIX, just before Neo and Trinity take 
a harrowing ride up an elevator shaft holding on to an elevator cable, Neo 
mutters a single phrase. What is that phrase?



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Sun, Nov 28, 2010 at 8:55 AM, Black, Michael (IS)  wrote:

>
> I find it interesting though that the math is different between the two
> compilers...I wonder which is actually "correct" ??
>
>
>
I ran a GMP version of the section of code we've highlighted, converting all
the double variables to "mpf" variables of 300+ bits of precision. The value
of realvalue after adding the rounder is
8.948471500499... . The first 15 digits are
8.948471, so "mathematically", I'd say gcc got it right.

So the question remains -- why does the Windows build get it wrong?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [ADV] 60% off "Using SQLite" and other O'Reilly ebooks

2010-11-29 Thread Jay A. Kreibich
On Mon, Nov 29, 2010 at 10:41:25AM -0700, Gerry Snyder scratched on the wall:
> I bought this book on opening day and now can highly recommend it.

  I'm glad you're finding it useful.

> It is a very useful supplement to the online docs. The info is pretty
> up-to-date, but SQLite keeps advancing so the most recent enhancements
> perforce are missing. For example, wal mode is not covered, but there
> is a good description of foreign keys.

  That's true.  In the final weeks of editing before we went to print,
  the SQLite development team and I were in a bit of a race to see who
  was going to "go gold" first: the book or SQLite 3.7.  The dev team
  won by about a week.

  Either way, we were unable to cover the new 3.7 features in the book.
  The book covers everything up-to-and-including 3.6.23.1 (the last 3.6
  release), but the APIs and features of 3.7 became stable too late to
  be included.

  Everyone recognized that WAL was a very important feature, however,
  so I did write a supplementary article:

  http://answers.oreilly.com/topic/2035-whats-new-in-sqlite-37/

  Looking back, it's hard to believe that 3.7 is only about three
  months old.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] searching with like on FTS3

2010-11-29 Thread boscowitch
The problem is that is is that i don't want the ICU tokenizer to split
single words entrys and shorter figure of speaches, and for those the
search is atm very good (and it has to be exact in 99% because i limit
the results to 1).

I modded the simple tokenizer to filter more stuff like [ ] 123456789 ;
here is an example entry:
感じる; [1] かんじる
to feel
and mecab and icu would split this to
感 じる
feeling, and gramatical ending.
but there is already another entry.
(splitting stuff in japanese is not tivial because the reading of a lot
of sign change when they are alone...)

if i could use multiple tokenizer and prioritize first the simple and
then the other mecab or ICU it would be best. but i guess it also will
increase the size massively..
using no indexing at all as these searches occure very rarely would
propably be best if possible at all (because i already have a manual
conversion of conjugated words liek 感じます polite to 感じる or
simmilar).

here you can see the app in a gif animation in action
http://www.boscowitch.de/projects/wadoku-notify

regards
boscowitch

Am Dienstag, den 30.11.2010, 00:22 +0700 schrieb Dan Kennedy:
> On 11/30/2010 12:09 AM, boscowitch wrote:
> > Hi recently I noticed that i can't search with the like '%searchword%'
> > syntax on an FTS3 virtual table.
> >
> > And with "match"  i can't search on example sentences (the indexed data
> > is a japanese dictionary an therefore has no spaces in example sentences
> > and there is no perfekt tokenizer atm i tried mecab but it makes
> > misstakes).
> 
> Can you use the ICU tokenizer?
> 
>http://www.sqlite.org/fts3.html#tokenizer
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [ADV] 60% off "Using SQLite" and other O'Reilly ebooks

2010-11-29 Thread Gerry Snyder
I bought this book on opening day and now can highly recommend it.

It is a very useful supplement to the online docs. The info is pretty
up-to-date, but SQLite keeps advancing so the most recent enhancements
perforce are missing. For example, wal mode is not covered, but there
is a good description of foreign keys.

In the general SQL sections, I found "The SELECT Pipeline" among the
most illuminating, giving good explanations of what happens in the
processing of each clause.

The book is one of my better recent purchases.

Gerry

On 11/29/10, Jay A. Kreibich  wrote:
>
>   O'Reilly Media is running a one-day sale, Monday, 29 Nov, only.
>
>   *All* ebooks and videos are 60% off, including "Using SQLite" and
>   over 2000 other titles.  Just use the discount code DDF2H when
>   placing your order.
>
>   With this discount, the ebook version of "Using SQLite" is only
>   $12.80 USD.  Purchasing this title provides lifetime access to
>   DRM-free PDF, ePub, Mobi, and APK files.
>
>   http://oreilly.com/store/index.html Sale info
>   http://oreilly.com/catalog/9780596521196Using SQLite
>
>-j
>
> --
> Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
> "Intelligence is like underwear: it is important that you have it,
>  but showing it to the wrong people has the tendency to make them
>  feel uncomfortable." -- Angela Johnson
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

-- 
Sent from my mobile device
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] searching with like on FTS3

2010-11-29 Thread Dan Kennedy
On 11/30/2010 12:09 AM, boscowitch wrote:
> Hi recently I noticed that i can't search with the like '%searchword%'
> syntax on an FTS3 virtual table.
>
> And with "match"  i can't search on example sentences (the indexed data
> is a japanese dictionary an therefore has no spaces in example sentences
> and there is no perfekt tokenizer atm i tried mecab but it makes
> misstakes).

Can you use the ICU tokenizer?

   http://www.sqlite.org/fts3.html#tokenizer
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] searching with like on FTS3

2010-11-29 Thread boscowitch
Hi recently I noticed that i can't search with the like '%searchword%'
syntax on an FTS3 virtual table.

And with "match"  i can't search on example sentences (the indexed data
is a japanese dictionary an therefore has no spaces in example sentences
and there is no perfekt tokenizer atm i tried mecab but it makes
misstakes).

Is there no other way than to hold the same data in an virtual FTS3 and
a normal table to do both search types? because i don't want to bloat
the download and in memory caching.

the normal table is 29MB
indexed is 59MB (and loaded completely in memory ~80MB)

both together would be over 100MB when loading completely into memory
and with basically the same data twice.

regards
boscowitch

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE 3.7.3 bug report (shell) - output in column?mode does not align UTF8-strings correctly

2010-11-29 Thread Nicolas Williams
On Fri, Nov 26, 2010 at 06:52:56AM +, Niklas Bäckman wrote:
> Igor Tandetnik  writes:
> > Note that counting codepoints, while it happens to help with your
> > particular data, won't help in general.  Consider combining
> > diacritics: U+00E4 (small A with diaeresis) looks the same as U+0061
> > U+0308 (small letter A + combining diaeresis) when printed on the
> > console.
> 
> You are right of course. The shell should not count code points, but 
> graphemes.

And their widths.

Nico
-- 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Mon, Nov 29, 2010 at 10:08 AM, Doug Currie  wrote:

>
> The Grisu2 strings do "round trip" correctly, which I think is where this
> thread started.
>
>
Grisu addresses the "floating-point to decimal to floating-point"
round-trip. The bug I found (it will become a bug report, right?) concerns
the "decimal to floating-point to decimal" round-trip. My understanding is
that SQLite wants to return the exact decimal string entered, for decimal
strings up to 15 digits. I think that's a different requirement.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WAL file size

2010-11-29 Thread Pavel Ivanov
> Well, I love sqlite, and I want to continue using it (small, fast,
> reliable ...).
> I think it is better to solve such problems inside sqlite

It's impossible. Just try to design the solution you want. Think of
how SQLite should behave to make you happy, think of it with all
details and don't forget that SQLite is a library living inside
several processes simultaneously, sometimes even on different
computers (although it's discouraged), those processes can crash
unpredictably and you have to manage all crashes predictably.
So if you are able to come up with some solution and post all
technical details here I think SQLite developers will be happy to
implement it.


Pavel

On Sun, Nov 28, 2010 at 3:19 AM, Yoni Londner  wrote:
> Hi,
>
>  > For a large scale system you have a third choice: use some other RDBMS
>  > which is implemented in one process and has a much better control over
>  > its data and much better communication between readers and writers.
> Well, I love sqlite, and I want to continue using it (small, fast,
> reliable ...).
> I think it is better to solve such problems inside sqlite (Not to
> mention you don't need large scale system to reproduce this issue, 50
> lines of C code is enough).
>
> Yoni.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Doug Currie

On Nov 29, 2010, at 9:37 AM, Rick Regan wrote:

> "For IEEE 754 double-precision numbers and 64-bit integers roughly
> 99.4% of all numbers can be processed efficiently. The remaining 0.6% are
> rejected and need to be printed by a slower complete algorithm."
> 
>  Hmmm. What's involved in the "slower complete algorithm" -- bignums?!

That quote refers to Grisu3 which produces the shortest string or else 
indicates failure, in which case Dragon4 or something similar using bignums is 
needed. But for Grisu2, no bignums are needed, and a correct string is always 
returned, though it is not the shortest string in 0.4% of cases. The Grisu2 
strings do "round trip" correctly, which I think is where this thread started.

e

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] [ADV] 60% off "Using SQLite" and other O'Reilly ebooks

2010-11-29 Thread Jay A. Kreibich

  O'Reilly Media is running a one-day sale, Monday, 29 Nov, only.

  *All* ebooks and videos are 60% off, including "Using SQLite" and
  over 2000 other titles.  Just use the discount code DDF2H when
  placing your order.

  With this discount, the ebook version of "Using SQLite" is only
  $12.80 USD.  Purchasing this title provides lifetime access to
  DRM-free PDF, ePub, Mobi, and APK files.

  http://oreilly.com/store/index.html   Sale info
  http://oreilly.com/catalog/9780596521196  Using SQLite

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Rick Regan
On Sun, Nov 28, 2010 at 8:09 PM, Doug Currie  wrote:

> The paper compares the performance of sprintf from glibc 2.11 and Grisu. I
> don't know if glibc sprintf is based on Gay's code; at one point I thought
> it was, but I cannot find an authoritative reference.
>
> In any case, the Grisus benchmarked about 5x to 10x faster than sprintf on
> average for random double inputs. The code should be simpler than dtoa.c
> since there are no bignums involved, and fewer special cases.
>
>
I'm pretty sure glibc doesn't use Gay's code (the last I checked, its
implementation was "home grown", in /stdio-common/printf_fp.c).
  Regarding the Grisus paper, this is from the abstract:

 "For IEEE 754 double-precision numbers and 64-bit integers roughly
99.4% of all numbers can be processed efficiently. The remaining 0.6% are
rejected and need to be printed by a slower complete algorithm."

  Hmmm. What's involved in the "slower complete algorithm" -- bignums?!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] how to search '%' in a string

2010-11-29 Thread 黄小刚
done !
3ks to davies.




At 2010-11-29 18:31:21,"Simon Davies"  wrote:

>2010/11/29 黄小刚 :
>> anybody tell me how to search '%' in a string? 3q:)
>
>http://www.sqlite.org/lang_expr.html#like
>
>Regards,
>Simon
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] how to search '%' in a string

2010-11-29 Thread Simon Davies
2010/11/29 黄小刚 :
> anybody tell me how to search '%' in a string? 3q:)

http://www.sqlite.org/lang_expr.html#like

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] how to search '%' in a string

2010-11-29 Thread 黄小刚
anybody tell me how to search '%' in a string? 3q:)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users