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.

>   o Alternatively, at least the error message issued from
>     locateFKeyIndex() could be improved.

Something like this?

      sqlite3ErrorMsg(pParse,
           "foreign key mismatch - \"%w\" referencing \"%w\"",
           pFKey->pFrom->zName, pFKey->zTo);

(from the current version)


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to