On Wed Apr 12, 2017 at 03:38:11PM -0400, Richard Hipp wrote:
> On 4/12/17, Jens Alfke <[email protected]> wrote:
> > Many of SQLite's pragma commands change database settings. It would be
> > helpful if their documentation[1] stated which of these persist across
> > closing/reopening the database, and which are scoped only to the open
> > connection. For example, the docs say that that 'pragma journal_mode=WAL' is
> > persistent. Presumably 'mmap_size' is not because it doesn't have any effect
> > on file storage. But there are some I'm unsure about:
> >
> > auto_vacuum, page_size — Persistent?
> > journal_size_limit, synchronous — Ephemeral?
>
> Yes. Which other PRAGMAs are you interested in?
>
> >
> > I'm asking because I'd like to know which pragmas I need to reissue every
> > time the database connection is opened, and which I only need to issue when
> > initializing a new database.
What would be useful (at least via the shell CLI) is a "list_pragmas"
pragma that shows for example something like this:
sqlite> PRAGMA list_pragmas;
pragma writeable default current permanent
------ --------- ------- ------- ---------
application_id yes 0 0 yes
auto_vacuum yes 0 0 yes
automatic_index yes 1 1 yes
busy_timeout yes 0 0 no
...
table_info no (complex) (complex) n/a
...
--
Mark Lawrence
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users