[sqlite] REGEX

2008-06-07 Thread Alyssa Papalopa

Has anybody developed a function to support REGEX?

_
Now you can invite friends from Facebook and other groups to join you on 
Windows Live™ Messenger. Add now.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_AddNow_Now
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] About dumping a memory DB to a file

2008-06-07 Thread 현시욱
Thank you for your tip Dennis.

Actually, the reason I asked for this is that I wanted to use SQLite in a
flash memory based file system.
Considering that the flash memory is a bit slower than a normal disk(also
the limitation of writing operations), I wanted to change SQLite in some way
that it can be more efficient and useful upon flash memory systems.
The first solution I thought of was to make a kind of a buffer below the
b-tree, but it was really difficult understanding the internal system of
SQLite. But I'm still working on it.
Second, I wanted SQLite to do all of its work in the memory. Yes this would
be dangerous if there are unexpected power-offs or crashes, but I am
assuming that there won't be such situations like them. Then I visited the
website and found the patch. It sure is too old, but I thought it would be
helpful if I tried it on mine.

Anyways, I very much appreciate your time, and would definitely try to use
the C API functions. Maybe I should find a book on SQLite.
Thank you.

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


Re: [sqlite] SQLite bug on AFP?

2008-06-07 Thread D. Richard Hipp

On Jun 7, 2008, at 4:40 PM, Peter K. Stys wrote:

> On Thu, Jun 5, 2008 at 2:04 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:
>
>>
>> On Jun 5, 2008, at 12:09 PM, Shawn Wilsher wrote:
>>
>>> Hey all,
>>>
>>> We are getting reports that sqlite is not working for users of AFP
>>> (Apple Filing Protocol) in Bug 417037 [1].  I was wondering if this
>>> was a known issue, and what we could do to help get this resolved.
>>
>>
>> I think the solution might be as simple as compiling with -
>> DSQLITE_ENABLE_LOCKING_STYLE=1.  This option only works on a Mac.  It
>> enables some Apple-contributed code that does file locking that works
>> on AFP as well as on other network filesystems that the Mac supports.
>>
>
> would this switch in any way affect the dismal R/W speeds for network
> volumes that were discussed a few weeks ago?
>

No.

D. Richard Hipp
[EMAIL PROTECTED]



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


Re: [sqlite] SQLite bug on AFP?

2008-06-07 Thread Peter K. Stys
On Thu, Jun 5, 2008 at 2:04 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:

>
> On Jun 5, 2008, at 12:09 PM, Shawn Wilsher wrote:
>
> > Hey all,
> >
> > We are getting reports that sqlite is not working for users of AFP
> > (Apple Filing Protocol) in Bug 417037 [1].  I was wondering if this
> > was a known issue, and what we could do to help get this resolved.
>
>
> I think the solution might be as simple as compiling with -
> DSQLITE_ENABLE_LOCKING_STYLE=1.  This option only works on a Mac.  It
> enables some Apple-contributed code that does file locking that works
> on AFP as well as on other network filesystems that the Mac supports.
>

would this switch in any way affect the dismal R/W speeds for network
volumes that were discussed a few weeks ago?

P.


-- 
-
Peter K. Stys, MD
Dept. of Clinical Neurosciences
Hotchkiss Brain Institute
University of Calgary
tel (403) 210-8646
-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Select problem with equal compare

2008-06-07 Thread Alexey Pechnikov
> Please read the recent thread "What is quicker" which has a long
> discussion on the limitations of floating point.
>
> A short summary might be, "Unless you assume that any value stored in
> floating point format is only an approximation to the input value, you
> will run into trouble sooner or later." If you need exact results (and
> want to avoid a _lot_ of analysis), use string values or integers
> (possibly scaled).

I can create table as

CREATE TABLE photo_tags
(
  save_date REAL collate binary,
...
);

and compare is right, but is this correct way for date values?

> Also, when starting a new thread, please do not just reply to an ongoing
> one and change the subject.

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


Re: [sqlite] Select problem with equal compare

2008-06-07 Thread Gerry Snyder
Alexey Pechnikov wrote:
> 1. I try to select:
>
> sqlite> select save_date from photo_tags where save_date<2454612.21079943 
> limit 1 offset 3073;
> save_date = 2454612.21079943
>
> But 2454612.21079943<2454612.21079943 is wrong result.
>
> 2
>   

Please read the recent thread "What is quicker" which has a long 
discussion on the limitations of floating point.

A short summary might be, "Unless you assume that any value stored in 
floating point format is only an approximation to the input value, you 
will run into trouble sooner or later." If you need exact results (and 
want to avoid a _lot_ of analysis), use string values or integers 
(possibly scaled).

Also, when starting a new thread, please do not just reply to an ongoing 
one and change the subject.

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


[sqlite] Select problem with equal compare

2008-06-07 Thread Alexey Pechnikov
1. I try to select:

sqlite> select save_date from photo_tags where save_date<2454612.21079943 
limit 1 offset 3073;
save_date = 2454612.21079943

But 2454612.21079943<2454612.21079943 is wrong result.

2. And I try

sqlite> select save_date from photo_tags where save_date=2454612.21079943;
sqlite>  

So, sqlite calculate 2454612.21079943!=2454612.21079943 

3. And this query working correctly:

sqlite> select save_date from photo_tags where save_date=(select save_date 
from photo_tags where save_date<2454612.21079943 limit 1 offset 3073);
save_date = 2454612.21079943

Table is like

CREATE TABLE photo_tags
(
  save_date REAL,
...
);
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] rtree extension question

2008-06-07 Thread Christophe Leske
Hi,

i am now using the rtree extension in my project, yet still see some 
slowdown for some scenarios (especially for searches in narrow/small 
rectangles).

I was therefore wondering if...

- one can somehow index the fields of an rtree table, and if so how?
- if there could be any other information in an rtree table other than 
the integer ID and then the real values for the rectangles.

The reason i am asking for this is because this yields to aways the same 
setup - an rtree lookup table, which ndexes back to the real information 
via its ID.

I would eventually like to ease my normal data table for the entries in 
the rtree table (in my case, i?d like to purge the longitude and 
latitude values that are used in the rtree table from the "normal" data 
table, as they are redundant in there), yet this yields to slower queries.

Usually, my rtree is used in queries like

select * from citydatabase where id in (select id from rtree where 
longitude_min>XX and longitude_maxXY and 
latitude_maxhttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users