Re: [sqlite] How rebuild with larger page size from command line?

2008-12-03 Thread Alexey Pechnikov
Hello! В сообщении от Wednesday 03 December 2008 04:48:48 Jerry Krinock написал(а): > I need a command-line script running on Mac OS 10.5 to rebuild sqlite   > 3 database files with a page_size of 4096 bytes. sqlite> PRAGMA page_size; 1024 sqlite> PRAGMA page_size=4096 ;vacuum; sqlite> PRAGMA pag

Re: [sqlite] How rebuild with larger page size from command line?

2008-12-03 Thread Thomas Briggs
Yeah, if you dump the file to a .read-able file then his idea is simpler and easier. The approach I described is probably better suited to situations where you need to .import a file, because in that case the file is raw data rather than SQL statements. -T On Wed, Dec 3, 2008 at 12:41 AM,

Re: [sqlite] How rebuild with larger page size from command line?

2008-12-02 Thread Jerry Krinock
On 2008 Dec, 02, at 21:19, Thomas Briggs wrote: > Try removing the semi-colon at the end of the .read statement. The > semi-colon is the query terminator, but because dot-commands aren't > queries they don't require the semi. As such the .read command in > twoLiner.sh is either seeing a third

Re: [sqlite] How rebuild with larger page size from command line?

2008-12-02 Thread Thomas Briggs
Try removing the semi-colon at the end of the .read statement. The semi-colon is the query terminator, but because dot-commands aren't queries they don't require the semi. As such the .read command in twoLiner.sh is either seeing a third (and invalid) argument or an invalid file name ("placesD

Re: [sqlite] How rebuild with larger page size from command line?

2008-12-02 Thread P Kishor
On 12/2/08, Jerry Krinock <[EMAIL PROTECTED]> wrote: > > On 2008 Dec, 02, at 19:44, Thomas Briggs wrote: > > > Put both commands (the pragma and the read) into a file (e.g. > > foo.txt) and then do: > > > > sqlite3 newDatabase.sqlite '.read foo.txt' > > > Looked like a great idea, Thomas but

Re: [sqlite] How rebuild with larger page size from command line?

2008-12-02 Thread Jerry Krinock
On 2008 Dec, 02, at 19:44, Thomas Briggs wrote: > Put both commands (the pragma and the read) into a file (e.g. > foo.txt) and then do: > > sqlite3 newDatabase.sqlite '.read foo.txt' Looked like a great idea, Thomas but it doesn't work for me: jk$ echo 'PRAGMA page_size=4096 ;' > twoLiner.sh

Re: [sqlite] How rebuild with larger page size from command line?

2008-12-02 Thread Thomas Briggs
Put both commands (the pragma and the read) into a file (e.g. foo.txt) and then do: sqlite3 newDatabase.sqlite '.read foo.txt' -T On Tue, Dec 2, 2008 at 8:48 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote: > I need a command-line script running on Mac OS 10.5 to rebuild sqlite > 3 database f

[sqlite] How rebuild with larger page size from command line?

2008-12-02 Thread Jerry Krinock
I need a command-line script running on Mac OS 10.5 to rebuild sqlite 3 database files with a page_size of 4096 bytes. The first line of my script dumps the database to a text file, then next line should read it create a new one. Since the default page size is 1024 bytes, documentation says