Re: [sqlite] SQLite on Mac

2007-07-19 Thread Nigel Metheringham


On 19 Jul 2007, at 16:45, Ahmed Sulaiman wrote:

Does SQLite work on Mac, and if yes, is there any Mac enabled version
that I could download?


SQLite is used on the Mac natively - for example Mail.app uses a
SQLite DB to keep its message data straight.

Try the sqlite3 shell command.

Nigel.

--
[ Nigel Metheringham   [EMAIL PROTECTED] ]
[ - Comments in this message are my own and not ITO opinion/policy - ]



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Is .dump the definitive backup method for sqlite?

2007-05-23 Thread Nigel Metheringham


On 23 May 2007, at 14:23, Joe Wilson wrote:

What version of sqlite are you using (2.x, 3.x)? One 3.x version in
particular had a bug related to not dumping indexes and triggers.
I've never used sqlite 2.x, so I can't comment on that.


All with sqlite 3 - both 3.1.3 (as installed on Mac OS X), and the  
current 3.3.17


Its not indexes/triggers - its data within tables that is incorrect.   
I suspect, but have not checked, that null characters (ie \000 or  
zero bytes) are either getting lost, or terminating the dump string.



Could you put together a few line schema and a couple of insert
statements that when dumped exhibit the problem you mention?


I'll see if I can reproduce the result with standard INSERT statements

Nigel.
--
[ Nigel Metheringham   [EMAIL PROTECTED] ]
[ - Comments in this message are my own and not ITO opinion/policy - ]



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Is .dump the definitive backup method for sqlite?

2007-05-23 Thread Nigel Metheringham
I recently experimented with putting binary data into SQLite table  
rows - I declared the column holding the binary data as a BLOB (not  
that it makes a ton of difference for SQLite).


This worked very well (using perl DBIx::Class/DBI/DBD::SQLite as the  
interface into SQLite).


However a dump and rebuild of the database - ie
  sqlite mydatabase.db .dump > out.sql
  sqlite newdatabase.db does not reconstruct the database correctly - there are the right  
number of rows, no errors are thrown during the rebuild, but some  
rows have differing data in them.


I presume that this should not happen, or is .dump & rebuild only  
valid for some subset of data?


Nigel.
--
[ Nigel Metheringham   [EMAIL PROTECTED] ]
[ - Comments in this message are my own and not ITO opinion/policy - ]



-
To unsubscribe, send email to [EMAIL PROTECTED]
-