Minor documentation update request for the pragma page's entry for 
incremental_vacuum:
http://www.sqlite.org/pragma.html#pragma_incremental_vacuum

Currently:

"PRAGMA schema.incremental_vacuum(N);

The incremental_vacuum pragma causes up to N pages to be removed from the 
freelist. The database file is truncated by the same amount. The 
incremental_vacuum pragma has no effect if the database is not in 
auto_vacuum=incremental mode or if there are no pages on the freelist. If there 
are fewer than N pages on the freelist, or if N is less than 1, or if N is 
omitted entirely, then the entire freelist is cleared."

The bit that threw me off a minute ago was the "or if N is omitted entirely" 
part. I took that to mean when you want to get rid of all the freelist pages 
you could do...

"pragma incremental_vacuum();"

...but that just gives...

Error: near ")": syntax error

It looks like the correct format for that version is simply...

"pragma incremental_vacuum;"

I'd recommend changing the entry to look like the integrity_check entry below 
it. Maybe something like...

"PRAGMA schema.incremental_vacuum(N);
PRAGMA schema.incremental_vacuum;

The incremental_vacuum pragma causes up to N pages to be removed from the 
freelist. The database file is truncated by the same amount. The 
incremental_vacuum pragma has no effect if the database is not in 
auto_vacuum=incremental mode or if there are no pages on the freelist. If there 
are fewer than N pages on the freelist, or if N is less than 1, or if using the 
second form of the pragma, then the entire freelist is cleared."

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to