On 27 Oct 2014, at 8:17am, Clemens Ladisch <clem...@ladisch.de> wrote:
> Tristan Van Berkom wrote: >> locateFKeyIndex() function issuing the not-so-informative >> message "foreign key mismatch" [...] >> >> o When foreign keys are enabled at CREATE TABLE time, it would >> be very helpful at this point to issue an error if a foreign >> key is declared which refers to a non-unique column (or compound >> FK referring to a non-unique set of keys in the parent table). > > The referenced table might not yet exist. This is the problem, and it occurs with both FOREIGN KEYs and TRIGGERs. I could do my standard thing and say that a schema with circular references between tables is badly designed but I don't actually know whether this is true or not. Nevertheless, SQL allows circular references so SQLite should deal with them. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users