2016-04-15 20:10 GMT+02:00 John McKown <john.archie.mckown at gmail.com>:

> On Fri, Apr 15, 2016 at 1:00 PM, Cecil Westerhof <cldwesterhof at gmail.com>
> wrote:
> ?<snip>?
>
>
> >
> > ?I do not think it is. When you add something to the database to signify
> > that a primary key is not allowed to be NULL, then this is not in an old
> > database, ergo in the old database NULLs are allowed. Where does backward
> > compatibility get broken?
> >
>
> ?I am somewhat hesitant to ?join in to this, however briefly. What occurs
> to me on the breaking of backward in compatibility is an old application,
> which is dependent on NULLs in a primary key, creating a _new_ database.
> Perhaps because it has a "unload" and "reload" or "import" capability. Or
> even one which depends on the user using the sqlite3 command to do backups.
> If a PRAGMA were to be established as you have suggested, then it needs to
> default to the _old_ way of doing things simply because the aforementioned
> old application will not know of it and thus not use it.
>

?That would make sense. It looks strange to me to depend on NULLs in a
primary key, but you never know.

When the default is the old way, then the pragma would not be very
beneficial in my opinion. So I think we can take the pragma from the table.
On the other hand it could be handy that by using the pragma there is no
need for ?unnecessary? NOT NULLs, but that becomes a lot less interesting
as what I first thought.

The next best option is then to make the problem very clear, so people will
not be bitten.

-- 
Cecil Westerhof

Reply via email to