[sqlite] foreign_key_check mystery

2016-05-19 Thread R Smith
On 2016/05/19 12:51 AM, James K. Lowden wrote: > On Wed, 18 May 2016 19:06:30 +0200 > R Smith wrote: > >>> I'm not convinced the requirement that the referenced columns be >>> unique is justified >> How do you see a parent-child relationship possible where the parent >> is not Unique? > I think

[sqlite] foreign_key_check mystery

2016-05-18 Thread R Smith
On 2016/05/18 5:43 PM, James K. Lowden wrote: > On Wed, 18 May 2016 08:32:24 +0200 > Clemens Ladisch wrote: > >> You get "foreign key mismatch" if you do not have the required >> indexes, i.e., according to a comment in the source, >> 1) The named parent key columns do not exist, or >> 2) The

[sqlite] foreign_key_check mystery

2016-05-18 Thread James K. Lowden
On Wed, 18 May 2016 19:06:30 +0200 R Smith wrote: > > I'm not convinced the requirement that the referenced columns be > > unique is justified > > How do you see a parent-child relationship possible where the parent > is not Unique? I think I can convince you that uniqueness is a good rule of

[sqlite] foreign_key_check mystery

2016-05-18 Thread James K. Lowden
On Wed, 18 May 2016 08:32:24 +0200 Clemens Ladisch wrote: > You get "foreign key mismatch" if you do not have the required > indexes, i.e., according to a comment in the source, > 1) The named parent key columns do not exist, or > 2) The named parent key columns do exist, but are not subject to

[sqlite] foreign_key_check mystery

2016-05-18 Thread Clemens Ladisch
James K. Lowden wrote: > I seem to be getting a foreign key check anomaly. I've checked the > constraint mentioned in the error message (and the other one, just in > case). Am I overlooking something, or has this been fixed since 3.8.4.1? > > sqlite> pragma foreign_key_check; > Error: foreign

[sqlite] foreign_key_check mystery

2016-05-17 Thread James K. Lowden
I seem to be getting a foreign key check anomaly. I've checked the constraint mentioned in the error message (and the other one, just in case). Am I overlooking something, or has this been fixed since 3.8.4.1? sqlite> pragma foreign_key_check; Error: foreign key mismatch - "Field"