Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Doug Currie
On Thu, Feb 12, 2015 at 1:35 PM, R.Smith rsm...@rsweb.co.za wrote: Now one could argue the warning should not be issued for it, or some warnings are fine as information. Personally I prefer zero unneeded warnings/clutter but that's just my pedantism. My pedantism is to prefer the warning

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Doug Currie
Well, if TERM_VNULL is 0, then the code is truly unreachable, so I wouldn't call it a compiler bug. e On Thu, Feb 12, 2015 at 9:26 AM, Richard Hipp d...@sqlite.org wrote: Dan is right. I think I'd calling this a clang bug. On Feb 12, 2015 9:06 AM, Dan Kennedy danielk1...@gmail.com wrote:

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread Doug Currie
For those interested in the initial misuse of aggregate issue of this thread, there is now a ticket: http://www.sqlite.org/src/tktview?name=2f7170d73b e On Mon, Feb 9, 2015 at 9:19 AM, Keith Medcalf kmedc...@dessus.com wrote: Not exactly since aggregates are implemented as functions. In

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread Doug Currie
Thank you, Richard. It works for me now. e On Mon, Feb 9, 2015 at 1:30 PM, Richard Hipp d...@sqlite.org wrote: On 2/7/15, Doug Currie doug.cur...@gmail.com wrote: In response to this SO question: http://stackoverflow.com/questions/28377210/how-to-retrieve-rank-based-on-total-mark

Re: [sqlite] ordinary CTE containing sum()

2015-02-08 Thread Doug Currie
In response to this SO question: http://stackoverflow.com/questions/28377210/how-to-retrieve-rank-based-on-total-mark-in-sqlite-table I tried to formulate a query without temp tables using an ordinary CTE, but received an error misuse of aggregate: sum(). tonypdmtr

[sqlite] ordinary CTE containing sum()

2015-02-07 Thread Doug Currie
In response to this SO question: http://stackoverflow.com/questions/28377210/how-to-retrieve-rank-based-on-total-mark-in-sqlite-table I tried to formulate a query without temp tables using an ordinary CTE, but received an error misuse of aggregate: sum(). This works: sqlite with tt (S_id,

Re: [sqlite] Best Practice: Storing Dates

2015-01-14 Thread Doug Nebeker
Whatever format you choose to store it in, I highly recommend storing the UTC time. It might be a little more work, but: 1. your program can display the correct local time, even if the database/app/user is in/changes to another timezone 2. you won't have to deal with seeing two 1:30am on the

Re: [sqlite] decoding a bitmask

2014-10-13 Thread Doug Currie
The query is on a visits table from a google chrome history database. The query seems to work OK if a single bit is set, but fails (a blank string is returned) when multiple bits are set. Any ideas why? It's because none of the WHEN 0x... cases, except 0xC0..., have multiple bits set. The

Re: [sqlite] Hexadecimal integer literals

2014-07-23 Thread Doug Currie
There is this range of negative values smack in the middle of an otherwise uniformly increasing sequence of positive numbers. That negative range seems discombobulating. Why are hex literals interpreted as signed at all? You could simply consider all hex literals as unsigned values. If you

Re: [sqlite] Hexadecimal integer literals

2014-07-23 Thread Doug Currie
Why are hex literals interpreted as signed at all? You could simply consider all hex literals as unsigned values. If you need a negative value, prefix it with the - operator, e.g., -0x77. With this approach (a) there is no discombobulating segment, (b) all 64 bit bit-masks are

Re: [sqlite] Hexadecimal integer literals

2014-07-23 Thread Doug Currie
Here's an analogy: a sequence of decimal digits is unsigned; it only becomes negative when you put a - in front of it. Why shouldn't hex work the same way? (to eliminate the discombobulating segment) Because then you would not be able to write (in hex) a 64-bit bitmap that had the

Re: [sqlite] Primary Key without DataAnnotation for Windows Runtime

2014-04-01 Thread Doug McDonald
-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Doug McDonald BSc(Hons) | MCTS | MBCS ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Documentation error: sqlite3_mutex_try

2014-02-15 Thread Doug Nebeker
The documentation says that sqlite3_mutex_try will always return SQLITE_BUSY for some systems (for example, Windows 95). That's not quite accurate from what I see in the latest implementation of winMutexTry. It will ALWAYS return SQLITE_BUSY for any Windows usage, making the existence of the

Re: [sqlite] Concrete example of corruption

2013-12-05 Thread Doug Currie
On Dec 5, 2013, at 8:55 PM, Warren Young war...@etr-usa.com wrote: On 12/5/2013 17:00, Scott Robison wrote: Might there be a way to implement a custom VFS for Mac to deal with this? Wouldn't it be a lot simpler to just put the DB file into a Mac package (i.e. directory) so the associated

Re: [sqlite] SQLite version 3.8.2 running 2.5x faster for some queries.

2013-11-24 Thread Doug Currie
On Nov 24, 2013, at 6:47 AM, Alek Paunov a...@declera.com wrote: BTW, I see the term deterministic in the SQL99 BNFs: … but different in PostgreSQL (immutable, stable, etc): There is value in compatibility, but those adjectives are awful. In computer science we have referential

Re: [sqlite] Mystery why SQLite will not work until System.Data.SQLite has been installed

2013-10-23 Thread Doug Currie
Paul Bainter wrote: Not sure what happened to this post previously, so I guess I'll try it again with some additional information GMail considered these messages spam for some reason. Check your spam folder. e ___ sqlite-users mailing list

Re: [sqlite] Hints for the query planner

2013-09-11 Thread Doug Currie
On Sep 10, 2013, at 6:23 PM, Scott Robison sc...@casaderobison.com wrote: I think I prefer something along the lines of unlikely or likely. The problem with a term like selective (at least in my brain) is that it doesn't imply (for the single argument version) in what way it is being

Re: [sqlite] To BEGIN or not to BEGIN. That is the question...

2013-08-30 Thread Doug Nebeker
Igor is naturally correct. One additional thing to keep in mind - the commit phase of a transaction is where a lot of work gets done (meaning slow disk access). So if you have a lot of INSERTs or DELETEs to do, doing many within a transaction will give you better performance. Doug

Re: [sqlite] CREATE INDEX and column order

2013-08-28 Thread Doug Nebeker
...@sqlite.org] On Behalf Of Simon Slavin Sent: Tuesday, August 27, 2013 7:29 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] CREATE INDEX and column order On 27 Aug 2013, at 1:07pm, Doug Nebeker ad...@poweradmin.com wrote: I was reading about the new query planner and came

[sqlite] CREATE INDEX and column order

2013-08-27 Thread Doug Nebeker
using that as my right-most column, but it seems it would be a great candidate to be switched. Thanks Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [Bug] sqlite3_finalize() *DOES NOT* return most recent evaluation error code

2013-08-21 Thread Doug Currie
I'm unable to reproduce the problem using C. Maybe it is in lsqlite3. Yes, lsqlite3 still uses the old sqlite3_prepare() API to maintain compatibility with some legacy systems. It is long past time that it should have changed to use sqlite3_prepare_v2(). Running Richard's example with

Re: [sqlite] Beginning database question

2013-04-17 Thread Doug Nebeker
shot. Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Carl Gross Sent: Tuesday, April 16, 2013 3:28 AM To: sqlite-users@sqlite.org Subject: [sqlite] Beginning database question Hi All, I'm an amateur programmer who has

[sqlite] set journal off working witth SQLiteConfig?

2013-03-14 Thread Doug Crites
for large transactions like this, please share! Thanks, Doug Doug Crites Sr Software Engineer doug.cri...@asg.commailto:doug.cri...@asg.com The Commons 708 Goodlette Road N Naples, FL 34102 Tel: 239.435.2293 Fax: 239.213.3501 Toll-Free: 800.932.5536 USA Only www.asg.comhttp://www.asg.com/ ASG

Re: [sqlite] SQLite strong-typing [WAS: inner vs. outer join inconsistency]

2013-03-07 Thread Doug Currie
On Mar 7, 2013, at 11:07 AM, Ryan Johnson ryan.john...@cs.utoronto.ca wrote: That does leave the question of what to do with cast ('1.0' as integer), though. Without the prefix-based matching that would now return NULL rather than 1, even though cast(1.0 as integer) would still return 1.

Re: [sqlite] VC++ and SQLite

2012-11-12 Thread Doug Nebeker
You might be surprised at the speed increase you see in compile time if you've got large projects. The time isn't lost to CPU as much, but disk I/O time adds up when hitting many hundreds of small (header) files (even with an SSD). Doug -Original Message- From: sqlite-users-boun

Re: [sqlite] Mac development question

2012-10-23 Thread Doug Currie
On Oct 23, 2012, at 4:58 PM, Igor Korot ikoro...@gmail.com wrote: 1. I know on Mac I need to build an application bundle. Where do I store the .db file relative to the bundle? Inside it? Home directory? Somewhere on the hard drive? What is the usual place for it? If the database is

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-06 Thread Doug Currie
On Aug 6, 2012, at 8:26 AM, Simon Slavin slav...@bigfraud.org wrote: So either Apple has made a change between versions, or we have different paths. I use fully qualified pathnames here: ~ e$ /usr/bin/sqlite3 :memory: 'SELECT sqlite_source_id()' 2012-04-03 19:43:07

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-06 Thread Doug Currie
On Aug 6, 2012, at 4:51 PM, Simon Slavin slav...@bigfraud.org wrote: On 6 Aug 2012, at 7:48pm, Doug Currie doug.cur...@gmail.com wrote: ~ e$ /usr/local/bin/sqlite3 :memory: 'SELECT sqlite_source_id()' 2012-05-14 01:41:23 8654aa9540fe9fd210899d83d17f3f407096c004 I think this copy has been

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-03 Thread Doug Currie
On Aug 3, 2012, at 2:33 PM, Dan Kennedy danielk1...@gmail.com wrote: There was a problem similar to your description at one point, but it should have been fixed before the 3.7.12 release. What do you get from the shell command SELECT sqlite_source_id(); on Mountain Lion? e$ /usr/bin/sqlite3

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-03 Thread Doug Currie
On Aug 3, 2012, at 3:32 PM, Tobias Giesen tobiasgie...@gmail.com wrote: Apparently Apple prevents starting other versions of it and redirects everything to their current version in /usr/bin. On ML here I can launch my version in /user/local/bin just fine. e$ which sqlite3

[sqlite] leap seconds

2012-07-13 Thread Doug Currie
The SQLite3 date time functions are designed assuming […] that every day is exactly 86400 seconds in duration. Before I start implementing TAI (or GPS time) to/from UTC translator plugin, has anyone already done this? Why? In a device that logs data with sub-second resolution, in my case a

Re: [sqlite] how to build sqlite4 (four)?

2012-06-28 Thread Doug Currie
On Jun 28, 2012, at 4:05 PM, Nico Williams wrote: It's also possibly a good idea to just not have autoincrement. Let the application implement it, no? After all, it can, including via triggers. Or with PostgreSQL-style sequences

Re: [sqlite] sqlite time is 2 hours to late

2012-06-27 Thread Doug Nebeker
. It was a painful lesson. Always store times in UTC. Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] VERY weird rounding error

2012-06-17 Thread Doug Currie
On Jun 17, 2012, at 12:23 PM, Keith Medcalf wrote: SQLITE_SIGNIFICANT_DIGITS defaults to 14, but you can override it. No matter what is requested, the maximum number of significant digits is limited to the specification, and rounding is applied to the remaining bits of the significand,

Re: [sqlite] Using SQL or C for data analysis?

2012-03-27 Thread Doug Currie
On Mar 27, 2012, at 3:46 PM, Larry Brasfield wrote: A DBMS is a good way to keep your raw data. But I highly doubt that a majority of your analysis algorithms are going to be expressible in SQL without going way beyond the intended purpose of the language. You will either find yourself

Re: [sqlite] SQLite

2011-11-10 Thread Doug Currie
On Nov 9, 2011, at 11:39 PM, Bhautik Kothadia wrote: Is there any Operating System Required for that? See: http://www.sqlite.org/custombuild.html especially section 5.0 Porting SQLite To A New Operating System If not then How much Memory is required? See: http://www.sqlite.org/malloc.html

Re: [sqlite] SQLite

2011-11-09 Thread Doug Currie
The PIC32MX664F064L has 64 KiB Program Memory Size 32 KiB RAM SQLite as it presently stands will not fit within these constraints. e On Nov 9, 2011, at 7:47 AM, Parthiv Shah wrote: Respected Sir, We want to use DB SQLite in our product. We are using PIC32MX664F064L microcontroller

Re: [sqlite] triggers : NEW keyword with multiple tables

2011-10-25 Thread Doug Currie
On Oct 25, 2011, at 10:59 AM, Sébastien Escudier wrote: CREATE TRIGGER my_trigger INSTEAD OF INSERT ON my_view BEGIN INSERT INTO table1(type) VALUES(NEW.table1.type); INSERT INTO table2(type) VALUES(NEW.table2.type); END; ... Why this syntax does not work anymore ? You haven't given

Re: [sqlite] Using modifiers in julianday function

2011-10-24 Thread Doug Currie
On Oct 24, 2011, at 11:07 AM, Dilip Ranganathan wrote: But as you all know, this doesn't work: select datetime(time) from table where time = julianday(datetime(max(time)),'-2 hour','localtime') order by time desc Try replacing datetime(max(time)) with (select datetime(max(time)) from

Re: [sqlite] MC/DC coverage explained wrong in the home page?

2011-09-23 Thread Doug Currie
On Sep 23, 2011, at 9:17 PM, Richard Hipp wrote: paper above completely ignores this issue. It is as if the authors had never heard of short-circuit evaluation. Or, perhaps they are familiar with the problem but could not reach agreement on its solution so simply didn't bring it up.

Re: [sqlite] SQLite + unicode

2011-08-10 Thread Doug Currie
On Aug 10, 2011, at 12:39 PM, NOCaut wrote: I work in VS2008 c++ i create data base my.db and wont use U N I C O D E function from this DLL i find class or unit for connect to my base from VS2008 http://sqlite.org/download.html - this link help me? you understand me? No, but maybe

Re: [sqlite] c-api

2011-07-27 Thread Doug Currie
On Jul 27, 2011, at 9:22 AM, Baruch Burstein wrote: Is there an easier way to get a single value (for instance select last_insert_rowid(); ) then prepare - step - column - finalize? http://www.sqlite.org/capi3ref.html#sqlite3_last_insert_rowid e

Re: [sqlite] Handle leak using IIS on windows 7?

2011-07-22 Thread Doug
This was exactly the problem; I didn't realize the 'static' variables are persisted between page views in ASP.Net Adding an '_instance = null;' fixed the issue. Thanks muchly. Cheers, Doug. On Tue, Jul 19, 2011 at 11:58 AM, Joe Mistachkin sql...@mistachkin.comwrote: After reading the code

[sqlite] Handle leak using IIS on windows 7?

2011-07-18 Thread Doug
? I'm using the Precompiled Binaries for 32-bit Windows (.NET Framework 4.0) from http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki(32 bit mode enabled on iis), but I've tried the 64-bit version with the same result. Cheers, Doug

Re: [sqlite] Handle leak using IIS on windows 7?

2011-07-18 Thread Doug
the file handle is automatically released). If you want to see it in action, create a new MVC project and add: DbLogger.Get(); To the home index page. Run it in debug mode and you'll see the issue. Cheers, Doug. code (in case the attachment fails): using System; using System.Collections.Generic

Re: [sqlite] OSX path

2011-06-17 Thread Doug Currie
On Jun 17, 2011, at 2:56 PM, john darnell wrote: I am attempting to open an SQLite database on the Mac (OSX Snow Leopard) and am getting an error. This is the code I am using: char DBEnginePath[1000]; strcpy(DBEnginePath, Macintosh HD:Applications:Adobe InDesign

Re: [sqlite] [BUG] Silent change in intergeral overflow handling in 3.7.6

2011-05-26 Thread Doug Currie
On May 26, 2011, at 2:54 AM, Jan Hudec wrote: Gotcha! No, it's not. -1-x is equivalent, but -x-1 is not: sqlite select -1-(163), -(163)-1; 9223372036854775807|9.22337203685478e+18 Besides my point was not that it's not possible, but that it would be more readable with dedicated

Re: [sqlite] SQLite Explorer (singular) is missing the STDEV function (standard deviation)

2011-03-31 Thread Doug Currie
On Mar 31, 2011, at 2:27 PM, Mike Rychener wrote: I have tried the latest Explorer and it gets a syntax error on STDEV. However, that function works in Eclipse just fine, to take the standard deviation of a column (like min, max, avg). Is there a workaround or other fix available? See

[sqlite] Update trigger

2011-03-29 Thread Sutter, Doug
values for all columns were logged but not where only changed columns were logged. Thanks, Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite.so dynamic library-linux

2011-03-19 Thread Doug
to test one of your targets too. Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Udon Shaun Sent: Friday, March 18, 2011 11:47 PM To: Pavel Ivanov; SQLite Subject: Re: [sqlite] SQLite.so dynamic library-linux @Pavel

Re: [sqlite] SQLite server

2010-12-22 Thread Doug
to the client. And if the response is large, will you page, or keep the transaction open on the server thus blocking all other clients? The devil is always in the details :) Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf

Re: [sqlite] First(s) select are very slow

2010-12-20 Thread Doug
instead of the much slower disk. Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Vander Clock Stephane Sent: Monday, December 20, 2010 8:43 AM To: General Discussion of SQLite Database Subject: [sqlite] First(s) select

Re: [sqlite] First(s) select are very slow

2010-12-20 Thread Doug
Adding to what Simon said, even the SQLite cache has to get filled initially as well. So those very first hits to the database are always the most expensive. Once commonly used pages (index pages?) are loaded, you're running closer to memory speed than disk speed. -Original Message-

Re: [sqlite] Windows performance problems associated with malloc()

2010-12-17 Thread Doug
I wonder if HeapSetInformation (which can enable a low-fragmentation heap) would be helpful too. You can set it on the process and the CRT heaps. Note that it's not available in Win2K and earlier. Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun

Re: [sqlite] assert crash in wal

2010-12-15 Thread Doug
communication/synchronization which is much easier to handle with threads in the same process. But you are right about the costs -- the benefits of using threads incur a cost -- a cost of being very careful. Doug ___ sqlite-users mailing list sqlite

Re: [sqlite] Backup-restore behaviour

2010-12-07 Thread Doug Currie
On Dec 7, 2010, at 10:49 AM, Csom Gyula wrote: It clarified the situation, that is backup-restore seems to be the best choice:) Just one more question. As you put backup-restore is based upon data pages (that could be binary a format I guess) not on plain SQL/data records. After all: Is

Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-30 Thread Doug
++ rules. And you can mix .c and .cpp files in the same project. As for what the difference is? That's a big question. Objects exist in C++, and they don't in C. That's the tip of the iceberg. Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun

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

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

2010-11-28 Thread Doug Currie
On Nov 28, 2010, at 11:18 AM, Rick Regan wrote: Michael, Thanks for the very thorough analysis. This is a difficult problem; fortunately it was solved 20 years ago... http://www.mail-archive.com/sqlite-users@sqlite.org/msg09529.html e ___

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

2010-11-28 Thread Doug Currie
On Nov 28, 2010, at 5:37 PM, Rick Regan wrote: On Sun, Nov 28, 2010 at 4:01 PM, Doug Currie doug.cur...@gmail.com wrote: On Nov 28, 2010, at 11:18 AM, Rick Regan wrote: Michael, Thanks for the very thorough analysis. This is a difficult problem; fortunately it was solved 20 years ago

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

2010-11-28 Thread Doug Currie
On Nov 28, 2010, at 6:19 PM, Rick Regan wrote: On Sun, Nov 28, 2010 at 5:52 PM, Doug Currie doug.cur...@gmail.com wrote: There is a new publication on this subject that may be of interest to those looking at providing solutions: http://portal.acm.org/citation.cfm?id=1806623

Re: [sqlite] Scaling of Cache

2010-10-18 Thread Doug
well thought out in SQLite so I'm wondering if anyone can comment on the why's. Thanks Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Monday, October 18, 2010 2:15 PM To: General Discussion

Re: [sqlite] Run Time Error #1 in VS2008

2010-10-11 Thread Doug
I use SQLite3 directly from a number of VS2008 projects and have never seen that issue. Can you find the line of code causing the problem? I am working on a project in VS2008 and I am including the sqlite3 code directly (compared to in the past using wrappers). The program is working

Re: [sqlite] C++ Unresolved external errors from DLL

2010-10-11 Thread Doug
sqlite3_bind_blob sqlite3_bind_double sqlite3_bind_int sqlite3_bind_int64 sqlite3_bind_null sqlite3_bind_parameter_count sqlite3_exec sqlite3_open ... That's always worked for me. Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf

[sqlite] Query suggestion?

2010-09-09 Thread Doug
of: SELECT StatID, max(Date), max(Value) FROM StatData GROUP BY StatID That would give me the most recent Date, but not the Value that corresponds with that Date. None of the other aggregate functions seem appropriate either. Thanks for any ideas. Doug

Re: [sqlite] Query suggestion?

2010-09-09 Thread Doug
Thank you Igor. You've helped me before with what also turned out to be a similar select referencing the same table twice. I guess it's a concept that I don't fully get. If there is a name for this technique I'll go Google and study up on it. Doug -Original Message- From: sqlite

Re: [sqlite] Query suggestion?

2010-09-09 Thread Doug
Thenk you Gerry. After some studying I now understand that the inner SELECT is executed for each outer row -- so trimming the outer result set early seems like a very good optimization idea. Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun

Re: [sqlite] Why the deadlock?

2010-08-24 Thread Doug Currie
On Aug 24, 2010, at 10:57 AM, Nikolaus Rath wrote: Nikolaus Rath nikolaus-bth8mxji...@public.gmane.org writes: Still no one able to clarify the issues raised in this thread? Let me try to summarize what I still don't understand: - Will SQLite acquire and release an EXCLUSIVE lock while

Re: [sqlite] playing with triggers

2010-08-19 Thread Doug Currie
On Aug 19, 2010, at 4:00 PM, David Bicking wrote: I haven't tried RAISE(ROLLBACK... as that seems to severe. RAISE(ABORT... removes the initial insert to Table1, which I want to avoid. RAISE(FAIL.. on lets say the fourth record inserted in to Table2, would leave the first three there,

Re: [sqlite] fast string prefix matching

2010-08-18 Thread Doug Reeder
On Aug 17, 2010, at 9:28 PM, Igor Tandetnik wrote: Doug Reeder reeder...@gmail.com wrote: I need to search for string prefix matches; for example given the path 'PP', I need to find 'PPA', 'PPBJQ', and 'PPz'. (The character set is all characters greater than or equal to 'A', and is case

[sqlite] fast string prefix matching

2010-08-17 Thread Doug Reeder
], ... Is there a faster statement that does what I want (my first SQL statement above) in pure SQL? -- Doug Reeder reeder...@gmail.com http://reeder29.livejournal.com/ https://twitter.com/reeder29 https://twitter.com/hominidsoftware http://outlinetracker.com

[sqlite] Possible Bug SQLITE 3.7.0

2010-08-03 Thread Doug Campbell
names in CREATE TABLE commands prior to importing into Postgres, because Postgres is case-insensitive unless the names are quoted. Possible resolution: Modify output syntax for CREATE TABLE generation for .dump and .schema to quote all table names. Cheers, Doug Campbell

Re: [sqlite] Couple of questions about WAL

2010-07-23 Thread Doug
or per connection? Thanks Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Is the absence of msvcrt.dll a known issue with SQLite Windows 2000

2010-06-05 Thread Doug
in your app to see if something else is missing a DLL. Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] What languages can include SQLite statically?

2010-06-01 Thread Doug Currie
On Jun 1, 2010, at 2:24 PM, Gilles Ganault wrote: Actually, it's a Blackfin processor, and since it's an embedded environment, RAM and storage (NAND) are an issue. You may find eLua interesting. http://www.eluaproject.net/ The supported platforms are heavily ARM based, but in the same

Re: [sqlite] sqlite on mac os x 64 bits

2010-05-18 Thread Doug Currie
On May 18, 2010, at 4:14 AM, Sylvain Pointeau wrote: but is it 64 bits? or do I have to add a special option? Last time I built a Universal Binary sqlite3 on OS X (March 2010 3.6.22) I had to CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure

Re: [sqlite] ANN: O'Reilly book Using SQLite available for pre-order

2010-05-04 Thread Doug
luck with the book Jay. Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] round problem?

2010-02-15 Thread Doug Currie
On Feb 15, 2010, at 1:43 PM, Roger Binns wrote: Shane Harrelson wrote: I'm looking at how this can be improved. It seems that everyone else is converging on using David Gay's dtoa.c We've been converging for a few years! http://www.mail-archive.com/sqlite-users@sqlite.org/msg09529.html e

Re: [sqlite] In Memory Usage

2010-01-04 Thread Doug Currie
On Jan 4, 2010, at 6:35 AM, sasikuma...@tcs.com wrote: I'm using SQLite DB version 3.6.12. I recently read about the feature of In-Memory Database and tried to implement it. I was able to create a new DB connection in memory, able to create a table and insert some set of records into the

Re: [sqlite] Unique index on REAL values and equality check

2009-12-13 Thread Doug Currie
On Dec 13, 2009, at 3:16 PM, Alexey Pechnikov wrote: As we can see, the unique index can check equlity of REAL values but the = operator can not. it's fantastic I think :-) The problem is not the = operator... sqlite create table test (save_date REAL unique); sqlite insert into test values

Re: [sqlite] sqlite for threads

2009-11-10 Thread Doug
the database will be written to (ie an insert, update, delete, etc). That, along with looping on sqlite3_prepare_v2 and sqlite3_step any time you get SQLITE_BUSY, virtually solved the issue for me. HTH Doug ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLite on PocketBook

2009-11-05 Thread Doug Currie
On Nov 5, 2009, at 5:15 PM, Beau Wilkinson wrote: I really think this warrants further discussion. Perhaps the correct answer (that ARMs implement a non-standard FP type which is incompatible with Sqlite) is already out there, but I think the issues I raised with that answer should at

Re: [sqlite] feature proposal - strong but dynamic typing

2009-10-30 Thread Doug Currie
On Oct 30, 2009, at 10:14 AM, P Kishor wrote: Actually, there can be one bad effect of Darren's suggestion, now that I think of it, and that would be for those who don't care for strong typing. They will end up getting strong typing for all non-UNIVERSAL columns whether they like it or not,

[sqlite] Limiting memory usage

2009-10-23 Thread Doug
I'm trying to figure out how to limit SQLite's memory usage while still giving it as much memory as I can. The app has about 50-60 separate database handles to 50-60 separate database files. Each handle is only used by a single thread at a time, and most are always accessed by the thread that

Re: [sqlite] Limiting memory usage

2009-10-23 Thread Doug
Yes, correct. I just showed it to indicate that all databases that are ever created use this page_size of 4KB. PRAGMA page_size=4096 This PRAGMA governs characteristics of a database you have not yet created: it's pages on disk, not pages in memory. The page_size is a characteristic of

Re: [sqlite] Limiting memory usage

2009-10-23 Thread Doug
? Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] PRAGMA scope

2009-10-20 Thread Doug
after calling sqlite3_open each time). Temp_store and synchronous don't make any mention of files or connections. Can/should it be assumed that they are global to the SQLite library? Thanks Doug ___ sqlite-users mailing list sqlite-users

Re: [sqlite] Fwd: sqlite3_prepare_v2

2009-10-01 Thread Doug
Try renaming the windows\system32\sqlite3.dll to sqlite3.lld (or anything else so you can easily find it and restore). Then see which app has problems launching (if any). Sqlite3.dll probably shouldn't be there anyway. Once you know what app needs that DLL, you can copy it into the

Re: [sqlite] one liner for insert or update ?

2009-09-12 Thread Doug
Wouldn't INSERT OR REPLACE do that for you? (which by the way, has to be one of the coolest features in SQLite of all!) http://www.sqlite.org/lang_insert.html Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf

[sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Doug
); Is there any slick way to make the GROUP BY faster, since I don't really need to group by all that data? Since there is an index on StatData.StatID, I would assume the GROUP BY would work by just hitting the index, but I've been wrong before. Thanks for any ideas from the group. Doug

Re: [sqlite] Huge numbers of savepoints.

2009-08-23 Thread Doug Currie
On Aug 23, 2009, at 6:46 AM, Chris Dew wrote: Note: this is not for production code, just an experiment in keeping a history of application 'state', allowing current state to be recalculated if an historic input is received 'late'. See

Re: [sqlite] (no subject)

2009-08-21 Thread Doug
have any issues with storing and retrieving local strings. If you don't use the wide-char (16) APIs, you would need to explicitly convert your strings to UTF-8 (which is not the same as ASCII) before handing to SQLite. Doug -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] What is a Relation?

2009-07-27 Thread Doug Currie
On Jul 27, 2009, at 10:33 AM, CityDev wrote: It's true that Codd and Date used the term 'relational' (They championed the N-ary Relational Model - others were around at the same time) but it's not easy to track the origin of the term in mathematics.

Re: [sqlite] .lib file?

2009-07-25 Thread Doug
haven't kept my sqlite3.def file up to date, but it's fairly recent if you want to use it. Since we can't post files to the newsgroup, I'll append it here. Doug start file EXPORTS sqlite3_aggregate_context sqlite3_aggregate_count sqlite3_auto_extension sqlite3_bind_blob sqlite3_bind_double

Re: [sqlite] SQLite: Porting to another Operating system.

2009-07-24 Thread Doug Currie
On Jul 24, 2009, at 8:44 AM, D. Richard Hipp wrote: SQLite database files are cross-platform. All you have to do is copy the file to the new machine. There is no separate external format. The same database file format work on all platforms. Just make sure that if you are moving to a new

[sqlite] Heirarchical queries question

2009-07-17 Thread Doug
INTEGER, Path TEXT, ParentDirID INTEGER ); and some data that represents this table structure: / /users /users/doug /users/brett /users/brett/work /users/brett/research /users/brett/research/SQL INSERT INTO Directory (DirID, Path, ParentDirID) VALUES (1, '/', 0); INSERT

Re: [sqlite] Heirarchical queries question

2009-07-17 Thread Doug
Wow Pavel, that's a cool approach. I understand the issue about having % in the path (which is a problem I need to work around), but what is special about '_' ? Thanks Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf

Re: [sqlite] sqlite3.OperationalError: unable to open database file

2009-07-07 Thread Doug Currie
On Jul 7, 2009, at 4:36 PM, nixonron wrote: conn = sqlite3.connect('c:\Ujimadata\aid.sqlite') Perhaps you meant conn = sqlite3.connect('c:\\Ujimadata\\aid.sqlite') or conn = sqlite3.connect('c:/Ujimadata/aid.sqlite') e ___ sqlite-users mailing

Re: [sqlite] Building sqlite

2009-06-29 Thread Doug
You may need SQLITE_THREADSAFE depending on how you're using the library -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of Robert Dailey Sent: Monday, June 29, 2009 1:51 PM To: General Discussion of SQLite Database

Re: [sqlite] sqlite3_exec unresponsive for insert, delete and update

2009-06-22 Thread Doug
I don't know anything about xcode, but I've been burned by bugs like this in the past. It was always my fault: console was connected to one DB, and my app was connected to another. Make REALLY sure you're using the database file that you think you are. Doug -Original Message- From

  1   2   3   >