On Thu, Jul 8, 2010 at 7:10 AM, Richard Hipp <d...@sqlite.org> wrote:

> Though, I will admit, this is confusing, and I was thinking last night
> about ways we could possibly change it....
>


Current behavior:

(1) PRAGMA name.journal_mode=MODE; -- set the mode to MODE for database
"name".

(2) PRAGMA name.journal_mode; -- return current journal mode for database
"name".

(3) PRAGMA journal_mode=MODE;  -- set the mode to MODE for all attached
databases and also apply MODE to all databases ATTACH-ed in the future.

(4) PRAGMA journal_mode; -- report the most recent setting by (3).  Report
"delete" if there have been no prior occurences of (3).

First Proposed Change:

(1) and (2) are the same.

(3) PRAGMA journal_mode=MODE;  -- set the mode to MODE for all attached
databases.  Databases created by subsequent ATTACH use MODE.  Existing
databases added by ATTACH use MODE if and only if doing so does not require
them to change in or out of WAL mode.

(4) PRAGMA journal_mode;  -- report the most recent setting by (3).  Or if
(3) has never been used, work the same as "PRAGMA main.journal_mode;"

Second Proposed Change:

Remove the WAL mode from "PRAGMA journal_mode".  The journal_mode pragma
only specifies the various rollback journal modes.  Enable the WAL using a
separate pragma such as  "PRAGMA wal=ON; PRAGMA wal=OFF;"

Thoughts?  Comments?  Other suggestions?

-- 
---------------------
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to