On Mon, Feb 10, 2014 at 10:06 PM, James K. Lowden
<jklow...@schemamania.org> wrote:

James proposes that when no DB is named on the command-line argument
list then a [user-specific] default be used, and that the user be
told.

I like it.  I admit that I often rely on the shell keeping no state
when run with no arguments (I do this to verify statement syntax and
query plans with simple schemas), but I won't miss that.

I suppose that it's possible that there are applications that rely on
the shell with no arguments opening an ephemeral DB (they might ATTACH
other DBs and otherwise rely on any schema statements on the main DB
having no persistent effect).  That is something to consider, but such
applications could have a .command in their ~/.sqliterc to override
this new behavior.  Like James, I prefer that new users observe safe
behavior.

>> (5) In what folder should the "standard" database file be created?
>
> The folder, er, directory should be the user's home directory, located
> by exactly the same logic that locates ~/.sqliterc.
>
>> (4) What should the name of the "standard" database file be?
>
> ${HOME}/.sqlite/db would be my choice.

+1

> Other thoughts:
>
> 1.  To retain existing behavior, consider making
>
>         attach database :memory: as main;

+1

> valid SQL in ~/.sqliterc.  As an interesting bonus, support for

Maybe.  Sounds like an accident waiting to happen.

That said, I'd like to be able to create TEMP schema such that it gets
re-created at DB open time (e.g., temp tables and triggers, so that
the triggers may use said temp tables without having to source schema
creation statements from any file).  But that's a different story.

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

Reply via email to