Re: [sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-19 Thread Simon Slavin
On 19 Jan 2018, at 1:48pm, R Smith wrote: > On 2018/01/19 3:36 PM, Simon Slavin wrote: > >> I hope one day to see SQLite4, in which everything done to avoid breaking >> backward compatibility is abandoned. > > That's an impossibility. > > If you mean that SQLite4 itself will not have to hono

Re: [sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-19 Thread R Smith
On 2018/01/19 3:36 PM, Simon Slavin wrote: On 19 Jan 2018, at 12:43pm, Richard Hipp wrote: I hope one day to see SQLite4, in which everything done to avoid breaking backward compatibility is abandoned. That's an impossibility. If you mean that SQLite4 itself will not have to honour backwar

Re: [sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-19 Thread Simon Slavin
On 19 Jan 2018, at 12:43pm, Richard Hipp wrote: > Sometimes one has to compromise the simplicity of the > design, or to document bugs rather than fix them, in order to avoid > breaking legacy applications. I hope one day to see SQLite4, in which everything done to avoid breaking backward comp

Re: [sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-19 Thread Richard Hipp
On 1/19/18, Shane Dev wrote: > I missed that part of the documentation, thanks I apologize for this goofy exception to the rules. Maintaining a widely-used library like SQLite in a way that is backwards compatible is difficult. Sometimes one has to compromise the simplicity of the design, or to

Re: [sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-19 Thread Keith Medcalf
01:32 >To: SQLite mailing list >Subject: [sqlite] "Error: NOT NULL constraint failed ..." when no >such constraint exists > >Hello, > >The following SQL works as I expect - > >sqlite> CREATE TABLE edges(parent int, child int, primary key(parent, >child))

Re: [sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-18 Thread Shane Dev
I missed that part of the documentation, thanks On 19 January 2018 at 07:51, Rowan Worth wrote: > https://www.sqlite.org/withoutrowid.html > > "NOT NULL is enforced on every column of the PRIMARY KEY in a WITHOUT ROWID > table." > > It goes on to say that NOT NULL is supposed to be enforced on a

Re: [sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-18 Thread Rowan Worth
https://www.sqlite.org/withoutrowid.html "NOT NULL is enforced on every column of the PRIMARY KEY in a WITHOUT ROWID table." It goes on to say that NOT NULL is supposed to be enforced on all PRIMARY KEY columns of _every_ table according to the SQL standard, but an early version of sqlite include

[sqlite] "Error: NOT NULL constraint failed ..." when no such constraint exists

2018-01-18 Thread Shane Dev
Hello, The following SQL works as I expect - sqlite> CREATE TABLE edges(parent int, child int, primary key(parent, child)); sqlite> insert into edges select null, 1; sqlite> select * from edges; parent child 1 sqlite> but if I remove the superfluous rowid column from the table definitio