[sqlite] two patches

2005-04-23 Thread Charles Mills
The first patch causes SQLite to use localtime_r() when available instead of using localtime() and a mutex (the configure script will have to be regenerated using automake). The second patch allows users to create and drop tables while cursors are open on other tables iff SQLITE_OMIT_AUTOV

Re: [sqlite] create table question

2005-04-08 Thread Charles Mills
nt: Friday, April 08, 2005 9:09 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] create table question Charles Mills wrote: I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table

Re: [sqlite] create table question

2005-04-08 Thread Charles Mills
On Apr 8, 2005, at 2:35 AM, Paolo Vernazza wrote: Charles Mills wrote: I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table is locked" error when I attempt this. In p

[sqlite] create table question

2005-04-07 Thread Charles Mills
I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table is locked" error when I attempt this. In psuedo code the logic is as follows: select_stmt = db.execute("SELECT * FROM people")

[sqlite] working with dates

2005-03-29 Thread Charles Mills
How have people writing SQLite bindings (or in general) dealt with inserting/binding and selecting time values? Some issues are * sort order * equivalence * recognizing time values when selecting from a database * allowing users to manipulate time values using SQL (specifically SQLite's built in

Re: [sqlite] Version 3.1.5

2005-03-14 Thread Charles Mills
On Mar 11, 2005, at 10:07 AM, D. Richard Hipp wrote: Version 3.1.5 is now available on the website. This release fixes a typo in the previous release that caused problems for OS-X users. -- D. Richard Hipp <[EMAIL PROTECTED]> Any chance this patch (http://www.sqlite.org/cvstrac/tktview?tn=1151) w

[sqlite] pragma table_info

2005-03-06 Thread Charles Mills
Is there anyway to do 'pragma table_info' on a table in an attached database (even if a table in the main database has the same name). I guess I am wondering why this doesn't work: PRAGMA table_info(database_name.table_name) I get 'near ".": syntax error'. -Charlie

Re: [sqlite] bug/problem with detach

2005-02-28 Thread Charles Mills
On Feb 28, 2005, at 10:05 PM, Charles Mills wrote: This patch doesn't have the memory leak the other one has and it is formatted correctly. Sorry about that :) whoops. -Charlie

Re: [sqlite] bug/problem with detach

2005-02-28 Thread Charles Mills
This patch doesn't have the memory leak the other one has and it is formatted correctly. Sorry about that :) -Charlie

Re: [sqlite] bug/problem with detach

2005-02-28 Thread Charles Mills
I downloaded sqlite-3.1.3 and made the fix. The patch is attached. Also created a ticket here: http://www.sqlite.org/cvstrac/tktview?tn=1151 -Charlie On Feb 16, 2005, at 2:15 PM, Charles Mills wrote: open the database "test.db" then execute the following sql commands ATTACH '

[sqlite] bug/problem with detach

2005-02-16 Thread Charles Mills
open the database "test.db" then execute the following sql commands ATTACH 'test.db' AS hey PRAGMA database_list # [0, "main", "/Users/boson/workspace/test.db"] # [2, "hey", "/Users/boson/workspace/test.db"] DETACH [hey] # error: no such database: [hey] DETACH hey # success # also note: ATTACH 'tes

Re: [sqlite] data types

2005-01-09 Thread Charles Mills
On Jan 9, 2005, at 9:52 PM, John Richard Moser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 /* ~ * SQL_ALCUBIERRE_CREATE_DB ~ * SQL instructions to create a database ~ */ #define SQL_ALCUBIERRE_CREATE_DB \ ~"CREATE TABLE" TBL_PACKAGES \ ~"(" \ ~"name varchar(255)," \

[sqlite] sqlite3_errmsg() question

2005-01-05 Thread Charles Mills
Hi, Do errors encountered when using sqlite3_step(), sqlite3_bind(), and other API functions which work on sqlite3_stmt's set the error message string in the corresponding sqlite3 db structure? The documentation leads me to believe that the answer is yes, but I wanted to be sure. Thanks, Charl

Re: [sqlite] Is there any way to enable recursive triggers?

2005-01-04 Thread Charles Mills
On Jan 4, 2005, at 7:03 AM, Brass Tilde wrote: FWIW, I'm told by our DBA that SQL Server 2000 has a setting that allows or disallows recursive trigger execution. When disallowed, triggers apparently just don't recursively call themselves, even if they are designed to do so, i.e. they won't g

Re: [sqlite] question about explained sql statement

2004-12-16 Thread Charles Mills
On Dec 16, 2004, at 12:01 PM, Charles Mills wrote: I was playing around with the C interface to sqlite3 and I was surprised by the results at the bottom of this email. Mainly: addr = 8 opcode = MakeRecord p1 = 3 p2 = 0 p3 = nni <--- I figured this would be "tti". Since fna

[sqlite] question about explained sql statement

2004-12-16 Thread Charles Mills
I was playing around with the C interface to sqlite3 and I was surprised by the results at the bottom of this email. Mainly: addr = 8 opcode = MakeRecord p1 = 3 p2 = 0 p3 = nni <--- I figured this would be "tti". Since fname and lname are strings. What am I missing? -Charlie $ ./test te

Re: [sqlite] Recursive Triggers

2004-12-03 Thread Charles Mills
On Dec 3, 2004, at 4:04 PM, D. Richard Hipp wrote: SQLite does not currently support recursive triggers. On of the main reasons for not supporting recursive triggers is that disallowing recursive triggers was seen as the easiest way to avoid infinite loops like this: CREATE TRIGGER loop AFTER UP