[sqlite] Errors with quickstart.html's C example

2009-05-01 Thread Samuel Baldwin
Howdy. When I try to compile the small C program at the bottom of http://www.sqlite.org/quickstart.html , I get the following errors: arrakis^library% gcc test.c test.c: In function ‘main’: test.c:21: warning: incompatible implicit declaration of built-in function ‘exit’ test.c:27: warning:

Re: [sqlite] Errors with quickstart.html's C example

2009-05-01 Thread Samuel Baldwin
Please, someone troll me like Theo de Raadt responding to someone saying OpenBSD is insecure... `gcc -lsqlite3 test.c' works like a charm. -- Samuel 'Shardz' Baldwin - staticfree.info/~samuel ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-05-01 Thread stephen liu
http://spserver.googlecode.com/files/spmemvfs-0.1.src.tar.gz Changes: * Modify the save callback, transfer the ownership of the buffer to callback function * Add a buffer map to pass buffer between application and sqlite3 vfs The demo code: static void * load( void * arg, const char * path, int

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-05-01 Thread stephen liu
> It also sounds like you are operating in an environment that is almost > entirely reading and with lots of memory. You could still store one Yes. The memvfs requires to entirely reading the database. So this solution is just for something like addressbook application, the data for one user is

Re: [sqlite] mutex and begin/end transaction

2009-05-01 Thread James Gregurich
So, you suggest I should build a commercial desktop application (for processing print-industry files and presenting them in a UI) in such a way that it spawns multiple processes and communicates with them via the filesystem or IPC APIs? Why would I want to go to that level of complexity

Re: [sqlite] mutex and begin/end transaction

2009-05-01 Thread John Stanton
I suggest that you peruse the source code of Pthreads to get some idea of what you do when you create a thread. They are not, as some people appear to believe, a magic way of making the machine do more and go faster. Threads are of course invaluable when you want one resource, such as a user,

Re: [sqlite] mutex and begin/end transaction

2009-05-01 Thread John Stanton
Science is the Scientific Method - observation, hypothesis and skepticism. The antithesis of politics. There are no facts in science, only observations and any hypothesis is only valid until a better one replaces it. You describe bad, politicized science. James Gregurich wrote: > With all

Re: [sqlite] Errors with quickstart.html's C example

2009-05-01 Thread John Stanton
What is your make file? It seems to be missing a link library. Samuel Baldwin wrote: > Howdy. When I try to compile the small C program at the bottom of > http://www.sqlite.org/quickstart.html , I get the following errors: > > arrakis^library% gcc test.c > test.c: In function ‘main’: >

Re: [sqlite] Errors with quickstart.html's C example

2009-05-01 Thread Samuel Baldwin
2009/5/1 John Stanton : > What is your make file?  It seems to be missing a link library. I hadn't gotten to that point yet. But, as the other email said, linking to sqlite3 does magic. -- Samuel 'Shardz' Baldwin - staticfree.info/~samuel

Re: [sqlite] mutex and begin/end transaction

2009-05-01 Thread James Gregurich
I describe reality. Someone has to be the arbiter of "better." Generally, that arbiter is the guy handing out the research grants. On May 1, 2009, at 5:33 AM, John Stanton wrote: > > Science is the Scientific Method - observation, hypothesis and > skepticism. The antithesis of politics.

Re: [sqlite] Strict affinity again

2009-05-01 Thread Florian Weimer
* D. Richard Hipp: > SQLite is strongly typed, Curiously, it's even more strongly typed than SQL: sqlite> SELECT 1 = '1'; 0 fw=> SELECT 1 = '1'; ?column? -- t (1 row) (In SQL, quoted values are not of string type, but their type is inferred from context.)

Re: [sqlite] mutex and begin/end transaction

2009-05-01 Thread John Stanton
The better sales pitch and better political connections persuade the granter of research grants. Better design and better science proves itself by performance and success in the marketplace and bad design and bad science consumes the grant without productivity. This has strayed from the

[sqlite] Names of Indexes (CREATE INDEX)

2009-05-01 Thread a a
Do index names need to be different from field names? When doing selects on indexed fields, can I use the field name, or must I use the index name? I just want normal indexes, i'm not looking to create indexes for multiple fields. Can I say: CREATE INDEX x ON t (x); ? or does it have to be:

Re: [sqlite] mutex and begin/end transaction

2009-05-01 Thread Douglas E. Fajardo
Gentlefolk: Sorry to be a 'wet blanket' here, but while this thread is an interesting debate, *this* list is about SQLITE, not the Scientific Method... As an observer on the sidelines, I would suggest that this discussion has strayed a little bit off topic :-) Uh... does anyone

Re: [sqlite] Names of Indexes (CREATE INDEX)

2009-05-01 Thread Igor Tandetnik
a a wrote: > Do index names need to be different from field names? No. > When doing selects on indexed fields, can I use the field name, or > must I use the index name? You must use the field name, you cannot use index name. An index will be used automatically if the

Re: [sqlite] Names of Indexes (CREATE INDEX)

2009-05-01 Thread Alexander A. Gnatyna
you can name indexes as you wish. if you use select - you should specify coluns names. engine well decide what index to use depend on CREATE INDEX statement and you SQL query. On Saturday 02 May 2009 02:45:03 a a wrote: > Do index names need to be different from field names? > When doing