On 9 Nov 2018, at 7:11am, Hick Gunter <h...@scigames.at> wrote:

> Foreign keys are ignored by default and need to be explicitly enabled. I 
> would expect this to include everything that relates to foreign keys.
> 
> -----Ursprüngliche Nachricht-----
> 
> I've casually discovered that the behavior of ALTER TABLE RENAME TO (versione 
> 3.25.x) seems to be affected by an odd glitch; FOREIGN KEY constraints are 
> updated as expected only when PRAGMA foreign_keys=1, otherwise they are just 
> ignored.

While your statement is correct, I would argue that the behaviour is harmful, 
and cannot possibly be what any programmer could want to happen.  Think how 
difficult it would be to diagnose this having happened, and then fix the 
problem it would create.

I might argue that correct behaviour would be to transform FOREIGN KEY 
constraints even when the PRAGMA is off.  Or I might argue that the attempt 
should generate an error result (SQLITE_MISUSE ?).

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

Reply via email to